diff options
author | pjd <pjd@FreeBSD.org> | 2012-06-13 21:22:35 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2012-06-13 21:22:35 +0000 |
commit | f7e18321ef9850591a2250b2f534c3d87ffe87fc (patch) | |
tree | e61a67077003a2aa16db3ec64e7e86c6a3a5887f /sys/kern/vfs_syscalls.c | |
parent | 219cd5caaa0b8746f101a0bba83d8104ff6a482a (diff) | |
download | FreeBSD-src-f7e18321ef9850591a2250b2f534c3d87ffe87fc.zip FreeBSD-src-f7e18321ef9850591a2250b2f534c3d87ffe87fc.tar.gz |
- Remove nfp variable that is not really needed.
- Update comment.
- Style nits.
MFC after: 1 month
Diffstat (limited to 'sys/kern/vfs_syscalls.c')
-rw-r--r-- | sys/kern/vfs_syscalls.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index aa887c0..9598a16 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -1093,7 +1093,6 @@ kern_openat(struct thread *td, int fd, char *path, enum uio_seg pathseg, struct file *fp; struct vnode *vp; int cmode; - struct file *nfp; int type, indx = -1, error, error_open; struct flock lf; struct nameidata nd; @@ -1120,11 +1119,13 @@ kern_openat(struct thread *td, int fd, char *path, enum uio_seg pathseg, /* * Allocate the file descriptor, but don't install a descriptor yet. */ - error = falloc_noinstall(td, &nfp); + error = falloc_noinstall(td, &fp); if (error) return (error); - /* An extra reference on `nfp' has been held for us by falloc_noinstall(). */ - fp = nfp; + /* + * An extra reference on `fp' has been held for us by + * falloc_noinstall(). + */ /* Set the flags early so the finit in devfs can pick them up. */ fp->f_flag = flags & FMASK; cmode = ((mode &~ fdp->fd_cmask) & ALLPERMS) &~ S_ISTXT; @@ -4480,7 +4481,6 @@ sys_fhopen(td, uap) struct flock lf; struct file *fp; int fmode, error, type; - struct file *nfp; int vfslocked; int indx; @@ -4508,15 +4508,17 @@ sys_fhopen(td, uap) return (error); } - error = falloc_noinstall(td, &nfp); + error = falloc_noinstall(td, &fp); if (error) { vput(vp); VFS_UNLOCK_GIANT(vfslocked); return (error); - } + } - /* An extra reference on `nfp' has been held for us by falloc(). */ - fp = nfp; + /* + * An extra reference on `fp' has been held for us by + * falloc_noinstall(). + */ #ifdef INVARIANTS td->td_dupfd = -1; #endif @@ -4549,7 +4551,7 @@ sys_fhopen(td, uap) if ((fmode & FNONBLOCK) == 0) type |= F_WAIT; if ((error = VOP_ADVLOCK(vp, (caddr_t)fp, F_SETLK, &lf, - type)) != 0) + type)) != 0) goto bad; atomic_set_int(&fp->f_flag, FHASLOCK); } |