cifs: add FL_CLOSE to fl_flags mask in cifs_read_flock
authorJeff Layton <jlayton@redhat.com>
Wed, 19 Sep 2012 13:22:46 +0000 (06:22 -0700)
committerSteve French <smfrench@gmail.com>
Tue, 25 Sep 2012 02:46:34 +0000 (21:46 -0500)
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>
fs/cifs/file.c

index 88e9c74e2cac64d15c48188e498c8abe7d0657ee..075f7cfd1da53aecfc75f171c75e4376c9180ecb 100644 (file)
@@ -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;