summaryrefslogtreecommitdiffstats
path: root/fs/cifs/file.c
diff options
context:
space:
mode:
authorJeff Layton2012-09-19 15:22:46 +0200
committerSteve French2012-09-25 04:46:34 +0200
commit3d6d854a13844223b603fd7a16a4a4a4afd62c72 (patch)
treeaa50ad285af91b227aba7a733643c678547e0f19 /fs/cifs/file.c
parentcifs: Mangle string used for unc in /proc/mounts (diff)
downloadkernel-qcow2-linux-3d6d854a13844223b603fd7a16a4a4a4afd62c72.tar.gz
kernel-qcow2-linux-3d6d854a13844223b603fd7a16a4a4a4afd62c72.tar.xz
kernel-qcow2-linux-3d6d854a13844223b603fd7a16a4a4a4afd62c72.zip
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: Alexander Bokovoy <abokovoy@redhat.com> Signed-off-by: Jeff Layton <jlayton@redhat.com> Reviewed-by: Pavel Shilovsky <piastry@etersoft.ru> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/file.c')
-rw-r--r--fs/cifs/file.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index 88e9c74e2cac..075f7cfd1da5 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -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;