aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSachin Prabhu <sprabhu@redhat.com>2016-07-29 17:38:21 -0400
committerSteve French <smfrench@gmail.com>2016-09-10 00:58:07 -0400
commit348c1bfa84dfc47da1f1234b7f2bf09fa798edea (patch)
tree51544877dbee9084d63aacdbd53d1ef4af05eac2
parentc1d8b24d18192764fe82067ec6aa8d4c3bf094e0 (diff)
Move check for prefix path to within cifs_get_root()
Signed-off-by: Sachin Prabhu <sprabhu@redhat.com> Tested-by: Aurelien Aptel <aaptel@suse.com> Signed-off-by: Steve French <smfrench@gmail.com>
-rw-r--r--fs/cifs/cifsfs.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index cc9cdab52dab..14ae4b8e1a3c 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -609,6 +609,9 @@ cifs_get_root(struct smb_vol *vol, struct super_block *sb)
609 char *s, *p; 609 char *s, *p;
610 char sep; 610 char sep;
611 611
612 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_USE_PREFIX_PATH)
613 return dget(sb->s_root);
614
612 full_path = cifs_build_path_to_root(vol, cifs_sb, 615 full_path = cifs_build_path_to_root(vol, cifs_sb,
613 cifs_sb_master_tcon(cifs_sb)); 616 cifs_sb_master_tcon(cifs_sb));
614 if (full_path == NULL) 617 if (full_path == NULL)
@@ -731,11 +734,7 @@ cifs_do_mount(struct file_system_type *fs_type,
731 sb->s_flags |= MS_ACTIVE; 734 sb->s_flags |= MS_ACTIVE;
732 } 735 }
733 736
734 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_USE_PREFIX_PATH) 737 root = cifs_get_root(volume_info, sb);
735 root = dget(sb->s_root);
736 else
737 root = cifs_get_root(volume_info, sb);
738
739 if (IS_ERR(root)) 738 if (IS_ERR(root))
740 goto out_super; 739 goto out_super;
741 740