If VOP_ADVLOCK() call or earlier checks failed don't check for a race with
close, because even if we had a race there is nothing to unlock. Discussed with: kib MFC after: 1 month
This commit is contained in:
parent
5e33d57ff1
commit
fd6049b186
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=237198
@ -668,6 +668,10 @@ kern_fcntl(struct thread *td, int fd, int cmd, intptr_t arg)
|
||||
}
|
||||
VFS_UNLOCK_GIANT(vfslocked);
|
||||
vfslocked = 0;
|
||||
if (error != 0) {
|
||||
fdrop(fp, td);
|
||||
break;
|
||||
}
|
||||
/* Check for race with close */
|
||||
FILEDESC_SLOCK(fdp);
|
||||
if (fget_locked(fdp, fd) != fp) {
|
||||
|
Loading…
Reference in New Issue
Block a user