提交 00b8c95b 编写于 作者: C Chengyu Song 提交者: Steve French

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: NChengyu Song <csong84@gatech.edu>
Acked-by: NJeff Layton <jeff.layton@primarydata.com>
Signed-off-by: NSteve French <smfrench@gmail.com>
上级 7196ac11
......@@ -1552,8 +1552,8 @@ cifs_setlk(struct file *file, struct file_lock *flock, __u32 type,
rc = server->ops->mand_unlock_range(cfile, flock, xid);
out:
if (flock->fl_flags & FL_POSIX)
posix_lock_file_wait(file, flock);
if (flock->fl_flags & FL_POSIX && !rc)
rc = posix_lock_file_wait(file, flock);
return rc;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册