diff options
author | Pavel Shilovsky <piastry@etersoft.ru> | 2012-12-24 05:41:19 -0500 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2013-01-02 00:04:30 -0500 |
commit | 63b7d3a41ccadef971a4ffbe6662119d4275ebf9 (patch) | |
tree | 02ccbd85b5628cc1cb4cb982c74514fe8d851fdb /fs/cifs/smb2ops.c | |
parent | 88cf75aaaf27a652b3e85960ac3060172dd3edac (diff) |
CIFS: Don't let read only caching for mandatory byte-range locked files
If we have mandatory byte-range locks on a file we can't cache reads
because pagereading may have conflicts with these locks on the server.
That's why we should allow level2 oplocks for files without mandatory
locks only.
Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru>
Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/smb2ops.c')
-rw-r--r-- | fs/cifs/smb2ops.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c index d79de7bc4435..c9c7aa7ed966 100644 --- a/fs/cifs/smb2ops.c +++ b/fs/cifs/smb2ops.c | |||
@@ -708,6 +708,7 @@ struct smb_version_values smb20_values = { | |||
708 | .cap_unix = 0, | 708 | .cap_unix = 0, |
709 | .cap_nt_find = SMB2_NT_FIND, | 709 | .cap_nt_find = SMB2_NT_FIND, |
710 | .cap_large_files = SMB2_LARGE_FILES, | 710 | .cap_large_files = SMB2_LARGE_FILES, |
711 | .oplock_read = SMB2_OPLOCK_LEVEL_II, | ||
711 | }; | 712 | }; |
712 | 713 | ||
713 | struct smb_version_values smb21_values = { | 714 | struct smb_version_values smb21_values = { |
@@ -725,6 +726,7 @@ struct smb_version_values smb21_values = { | |||
725 | .cap_unix = 0, | 726 | .cap_unix = 0, |
726 | .cap_nt_find = SMB2_NT_FIND, | 727 | .cap_nt_find = SMB2_NT_FIND, |
727 | .cap_large_files = SMB2_LARGE_FILES, | 728 | .cap_large_files = SMB2_LARGE_FILES, |
729 | .oplock_read = SMB2_OPLOCK_LEVEL_II, | ||
728 | }; | 730 | }; |
729 | 731 | ||
730 | struct smb_version_values smb30_values = { | 732 | struct smb_version_values smb30_values = { |