Date: Sun, 17 Jun 2012 21:04:22 +0000 (UTC) From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r237204 - head/sys/kern Message-ID: <201206172104.q5HL4M0t032499@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pjd Date: Sun Jun 17 21:04:22 2012 New Revision: 237204 URL: http://svn.freebsd.org/changeset/base/237204 Log: Don't check for race with close on advisory unlock (there is nothing smart we can do when such a race occurs). This saves lock/unlock cycle for the filedesc lock for every advisory unlock operation. MFC after: 1 month Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Sun Jun 17 21:02:48 2012 (r237203) +++ head/sys/kern/kern_descrip.c Sun Jun 17 21:04:22 2012 (r237204) @@ -668,7 +668,8 @@ kern_fcntl(struct thread *td, int fd, in } VFS_UNLOCK_GIANT(vfslocked); vfslocked = 0; - if (error != 0) { + if (error != 0 || flp->l_type == F_UNLCK || + flp->l_type == F_UNLCKSYS) { fdrop(fp, td); break; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201206172104.q5HL4M0t032499>