mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-03 07:38:10 +00:00
cifs: potential missing check for posix_lock_file_wait
posix_lock_file_wait may fail under certain circumstances, and its result is usually checked/returned. But given the complexity of cifs, I'm not sure if the result is intentially left unchecked and always expected to succeed. Signed-off-by: Chengyu Song <csong84@gatech.edu> Acked-by: Jeff Layton <jeff.layton@primarydata.com> Signed-off-by: Steve French <smfrench@gmail.com>
This commit is contained in:
parent
7196ac113a
commit
00b8c95b68
1 changed files with 2 additions and 2 deletions
|
@ -1552,8 +1552,8 @@ cifs_setlk(struct file *file, struct file_lock *flock, __u32 type,
|
||||||
rc = server->ops->mand_unlock_range(cfile, flock, xid);
|
rc = server->ops->mand_unlock_range(cfile, flock, xid);
|
||||||
|
|
||||||
out:
|
out:
|
||||||
if (flock->fl_flags & FL_POSIX)
|
if (flock->fl_flags & FL_POSIX && !rc)
|
||||||
posix_lock_file_wait(file, flock);
|
rc = posix_lock_file_wait(file, flock);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue