vfs: use vrefact in getcwd and fchdir
This commit is contained in:
parent
0e638f57e6
commit
25e578de55
@ -2066,9 +2066,9 @@ kern___getcwd(struct thread *td, char *buf, enum uio_seg bufseg, u_int buflen,
|
||||
fdp = td->td_proc->p_fd;
|
||||
FILEDESC_SLOCK(fdp);
|
||||
cdir = fdp->fd_cdir;
|
||||
VREF(cdir);
|
||||
vrefact(cdir);
|
||||
rdir = fdp->fd_rdir;
|
||||
VREF(rdir);
|
||||
vrefact(rdir);
|
||||
FILEDESC_SUNLOCK(fdp);
|
||||
error = vn_fullpath1(td, cdir, rdir, tmpbuf, &bp, buflen);
|
||||
vrele(rdir);
|
||||
|
@ -754,7 +754,7 @@ sys_fchdir(td, uap)
|
||||
if (error != 0)
|
||||
return (error);
|
||||
vp = fp->f_vnode;
|
||||
VREF(vp);
|
||||
vrefact(vp);
|
||||
fdrop(fp, td);
|
||||
vn_lock(vp, LK_SHARED | LK_RETRY);
|
||||
AUDIT_ARG_VNODE1(vp);
|
||||
|
Loading…
x
Reference in New Issue
Block a user