diff options
author | pjd <pjd@FreeBSD.org> | 2012-06-17 21:04:22 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2012-06-17 21:04:22 +0000 |
commit | 0118c8606277dc863307564505e6b7a9e2400e79 (patch) | |
tree | 709916527bed83f9797011e88eeed5829b522db4 /sys/kern/kern_descrip.c | |
parent | 1b14ff5075853dd7586ce666e2f199178fa9c674 (diff) | |
download | FreeBSD-src-0118c8606277dc863307564505e6b7a9e2400e79.zip FreeBSD-src-0118c8606277dc863307564505e6b7a9e2400e79.tar.gz |
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
Diffstat (limited to 'sys/kern/kern_descrip.c')
-rw-r--r-- | sys/kern/kern_descrip.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index 6850734..c2db4c0 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -668,7 +668,8 @@ kern_fcntl(struct thread *td, int fd, int cmd, intptr_t arg) } 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; } |