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:
Pawel Jakub Dawidek 2012-06-17 21:04:22 +00:00
parent fc9174db51
commit d99e1d5fd6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=237204

View File

@ -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;
}