From owner-svn-src-head@FreeBSD.ORG Wed Jun 13 21:22:36 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1C3111065680; Wed, 13 Jun 2012 21:22:36 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id E2C548FC1F; Wed, 13 Jun 2012 21:22:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q5DLMZcP049713; Wed, 13 Jun 2012 21:22:35 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5DLMZdc049711; Wed, 13 Jun 2012 21:22:35 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201206132122.q5DLMZdc049711@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Wed, 13 Jun 2012 21:22:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237032 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jun 2012 21:22:36 -0000 Author: pjd Date: Wed Jun 13 21:22:35 2012 New Revision: 237032 URL: http://svn.freebsd.org/changeset/base/237032 Log: - Remove nfp variable that is not really needed. - Update comment. - Style nits. MFC after: 1 month Modified: head/sys/kern/vfs_syscalls.c Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Wed Jun 13 21:15:01 2012 (r237031) +++ head/sys/kern/vfs_syscalls.c Wed Jun 13 21:22:35 2012 (r237032) @@ -1093,7 +1093,6 @@ kern_openat(struct thread *td, int fd, c 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, c /* * 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); }