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
This commit is contained in:
parent
fc9174db51
commit
d99e1d5fd6
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user