提交 3d6d854a 编写于 作者: J Jeff Layton 提交者: Steve French

cifs: add FL_CLOSE to fl_flags mask in cifs_read_flock

FL_CLOSE is quite common when you close a file on which you hold a
lock. The spurious "Unknown lock flags" message in cFYI is
confusing in this case.
Reported-by: NAlexander Bokovoy <abokovoy@redhat.com>
Signed-off-by: NJeff Layton <jlayton@redhat.com>
Reviewed-by: NPavel Shilovsky <piastry@etersoft.ru>
Signed-off-by: NSteve French <sfrench@us.ibm.com>
上级 ecdb69e2
......@@ -1173,7 +1173,8 @@ cifs_read_flock(struct file_lock *flock, __u32 *type, int *lock, int *unlock,
if (flock->fl_flags & FL_LEASE)
cFYI(1, "Lease on file - not implemented yet");
if (flock->fl_flags &
(~(FL_POSIX | FL_FLOCK | FL_SLEEP | FL_ACCESS | FL_LEASE)))
(~(FL_POSIX | FL_FLOCK | FL_SLEEP |
FL_ACCESS | FL_LEASE | FL_CLOSE)))
cFYI(1, "Unknown lock flags 0x%x", flock->fl_flags);
*type = server->vals->large_lock_type;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册