diff options
Diffstat (limited to 'fs/cifs/file.c')
-rw-r--r-- | fs/cifs/file.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index bd135c4e4958..71a30fd76aa8 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c | |||
@@ -649,7 +649,9 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *pfLock) | |||
649 | wire */ | 649 | wire */ |
650 | if (IS_GETLK(cmd)) { | 650 | if (IS_GETLK(cmd)) { |
651 | if(experimEnabled && | 651 | if(experimEnabled && |
652 | (cifs_sb->tcon->ses->capabilities & CAP_UNIX)) { | 652 | (cifs_sb->tcon->ses->capabilities & CAP_UNIX) && |
653 | (CIFS_UNIX_FCNTL_CAP & | ||
654 | le64_to_cpu(cifs_sb->tcon->fsUnixInfo.Capability))) { | ||
653 | int posix_lock_type; | 655 | int posix_lock_type; |
654 | if(lockType & LOCKING_ANDX_SHARED_LOCK) | 656 | if(lockType & LOCKING_ANDX_SHARED_LOCK) |
655 | posix_lock_type = CIFS_RDLCK; | 657 | posix_lock_type = CIFS_RDLCK; |
@@ -686,7 +688,9 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *pfLock) | |||
686 | return rc; | 688 | return rc; |
687 | } | 689 | } |
688 | if (experimEnabled && | 690 | if (experimEnabled && |
689 | (cifs_sb->tcon->ses->capabilities & CAP_UNIX)) { | 691 | (cifs_sb->tcon->ses->capabilities & CAP_UNIX) && |
692 | (CIFS_UNIX_FCNTL_CAP & | ||
693 | le64_to_cpu(cifs_sb->tcon->fsUnixInfo.Capability))) { | ||
690 | int posix_lock_type; | 694 | int posix_lock_type; |
691 | if(lockType & LOCKING_ANDX_SHARED_LOCK) | 695 | if(lockType & LOCKING_ANDX_SHARED_LOCK) |
692 | posix_lock_type = CIFS_RDLCK; | 696 | posix_lock_type = CIFS_RDLCK; |