aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/smb1ops.c
diff options
context:
space:
mode:
authorSachin Prabhu <sprabhu@redhat.com>2013-11-27 08:27:12 -0500
committerSteve French <smfrench@gmail.com>2014-01-20 01:14:05 -0500
commit0ecdb4f572f6ab2219a01e3af349863f6e8b45af (patch)
tree7c0979808ff41e9d66f11342cb448e797865f395 /fs/cifs/smb1ops.c
parent0f8dce1cb7454f8795b73c5695a28e7a21a57ba0 (diff)
cifs: move unix extension call to cifs_query_symlink()
Unix extensions rigth now are only applicable to smb1 operations. Move the check and subsequent unix extension call to the smb1 specific call to query_symlink() ie. cifs_query_symlink(). Signed-off-by: Sachin Prabhu <sprabhu@redhat.com> Reviewed-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/smb1ops.c')
-rw-r--r--fs/cifs/smb1ops.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/fs/cifs/smb1ops.c b/fs/cifs/smb1ops.c
index 1470ec4fc39d..988fddb72025 100644
--- a/fs/cifs/smb1ops.c
+++ b/fs/cifs/smb1ops.c
@@ -918,23 +918,31 @@ cifs_query_symlink(const unsigned int xid, struct cifs_tcon *tcon,
918 918
919 cifs_dbg(FYI, "%s: path: %s\n", __func__, full_path); 919 cifs_dbg(FYI, "%s: path: %s\n", __func__, full_path);
920 920
921 /* Check for unix extensions */
922 if (cap_unix(tcon->ses)) {
923 rc = CIFSSMBUnixQuerySymLink(xid, tcon, full_path, target_path,
924 cifs_sb->local_nls);
925 goto out;
926 }
927
921 rc = CIFSSMBOpen(xid, tcon, full_path, FILE_OPEN, 928 rc = CIFSSMBOpen(xid, tcon, full_path, FILE_OPEN,
922 FILE_READ_ATTRIBUTES, OPEN_REPARSE_POINT, &netfid, 929 FILE_READ_ATTRIBUTES, OPEN_REPARSE_POINT, &netfid,
923 &oplock, NULL, cifs_sb->local_nls, 930 &oplock, NULL, cifs_sb->local_nls,
924 cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); 931 cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
925 if (rc) 932 if (rc)
926 return rc; 933 goto out;
927 934
928 rc = CIFSSMBQuerySymLink(xid, tcon, netfid, target_path, 935 rc = CIFSSMBQuerySymLink(xid, tcon, netfid, target_path,
929 cifs_sb->local_nls); 936 cifs_sb->local_nls);
930 if (rc) { 937 if (rc)
931 CIFSSMBClose(xid, tcon, netfid); 938 goto out_close;
932 return rc;
933 }
934 939
935 convert_delimiter(*target_path, '/'); 940 convert_delimiter(*target_path, '/');
941out_close:
936 CIFSSMBClose(xid, tcon, netfid); 942 CIFSSMBClose(xid, tcon, netfid);
937 cifs_dbg(FYI, "%s: target path: %s\n", __func__, *target_path); 943out:
944 if (!rc)
945 cifs_dbg(FYI, "%s: target path: %s\n", __func__, *target_path);
938 return rc; 946 return rc;
939} 947}
940 948