Skip to contentSkip to conversation

cifs: add FL_CLOSE to fl_flags mask in cifs_read_flock

PATCH Applied Jeff Layton 3 participants 3 messages Sep 13, 2012 – Sep 15, 2012 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 fs/cifs/file.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
fs/cifs/file.c +2 -1
index 093f5a3..33158cd 100644
@@ -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;
Signature · 1 line
1.7.11.4

A message that is not in the archive (sent off-list or not yet received): 1347568691-24628-1-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org

Reviewed-by
#2 lore raw

2012/9/14 Jeff Layton <[email protected]>:

Quoted 27 lines

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.

---
 fs/cifs/file.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
fs/cifs/file.c +2 -2
index 093f5a3..33158cd 100644
@@ -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;
--

1.7.11.4

Quoted 4 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 2 lines
Best regards,
Pavel Shilovsky.

A message that is not in the archive (sent off-list or not yet received): CAKywueRVT6YNoQaX-wraMuB7CeD51x4_6yfKKkujAaFWO-2pfA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

Applied
#4 lore raw

Merged into cifs-2.6.git

Quoted 38 lines · Pavel Shilovsky

2012/9/14 Jeff Layton <[email protected]>:

Quoted 27 lines

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.

---
 fs/cifs/file.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
fs/cifs/file.c +2 -2
index 093f5a3..33158cd 100644
@@ -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;
--

1.7.11.4

Quoted 4 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

--
Best regards,
Pavel Shilovsky.

Signature · 3 lines
Thanks,

Steve