aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/connect.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r--fs/cifs/connect.c37
1 files changed, 22 insertions, 15 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index cf4bcf3a45e6..b8f1baabd343 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -1920,27 +1920,34 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
1920 cifs_sb->tcon = tcon; 1920 cifs_sb->tcon = tcon;
1921 tcon->ses = pSesInfo; 1921 tcon->ses = pSesInfo;
1922 1922
1923 /* do not care if following two calls succeed - informational only */ 1923 /* do not care if following two calls succeed - informational */
1924 CIFSSMBQFSDeviceInfo(xid, tcon); 1924 CIFSSMBQFSDeviceInfo(xid, tcon);
1925 CIFSSMBQFSAttributeInfo(xid, tcon); 1925 CIFSSMBQFSAttributeInfo(xid, tcon);
1926
1926 if (tcon->ses->capabilities & CAP_UNIX) { 1927 if (tcon->ses->capabilities & CAP_UNIX) {
1927 if(!CIFSSMBQFSUnixInfo(xid, tcon)) { 1928 if(!CIFSSMBQFSUnixInfo(xid, tcon)) {
1928 if(!volume_info.no_psx_acl) { 1929 __u64 cap =
1929 if(CIFS_UNIX_POSIX_ACL_CAP & 1930 le64_to_cpu(tcon->fsUnixInfo.Capability);
1930 le64_to_cpu(tcon->fsUnixInfo.Capability)) 1931 cap &= CIFS_UNIX_CAP_MASK;
1931 cFYI(1,("server negotiated posix acl support")); 1932 if(volume_info.no_psx_acl)
1932 sb->s_flags |= MS_POSIXACL; 1933 cap &= ~CIFS_UNIX_POSIX_ACL_CAP;
1934 else if(CIFS_UNIX_POSIX_ACL_CAP & cap) {
1935 cFYI(1,("negotiated posix acl support"));
1936 sb->s_flags |= MS_POSIXACL;
1933 } 1937 }
1934 1938
1935 /* Try and negotiate POSIX pathnames if we can. */ 1939 if(volume_info.posix_paths == 0)
1936 if (volume_info.posix_paths && (CIFS_UNIX_POSIX_PATHNAMES_CAP & 1940 cap &= ~CIFS_UNIX_POSIX_PATHNAMES_CAP;
1937 le64_to_cpu(tcon->fsUnixInfo.Capability))) { 1941 else if(cap & CIFS_UNIX_POSIX_PATHNAMES_CAP) {
1938 if (!CIFSSMBSetFSUnixInfo(xid, tcon, CIFS_UNIX_POSIX_PATHNAMES_CAP)) { 1942 cFYI(1,("negotiate posix pathnames"));
1939 cFYI(1,("negotiated posix pathnames support")); 1943 cifs_sb->mnt_cifs_flags |=
1940 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_POSIX_PATHS; 1944 CIFS_MOUNT_POSIX_PATHS;
1941 } else { 1945 }
1942 cFYI(1,("posix pathnames support requested but not supported")); 1946
1943 } 1947 cFYI(1,("Negotiate caps 0x%x",(int)cap));
1948
1949 if (CIFSSMBSetFSUnixInfo(xid, tcon, cap)) {
1950 cFYI(1,("setting capabilities failed"));
1944 } 1951 }
1945 } 1952 }
1946 } 1953 }