diff options
Diffstat (limited to 'fs/cifs/cifs_dfs_ref.c')
-rw-r--r-- | fs/cifs/cifs_dfs_ref.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/cifs/cifs_dfs_ref.c b/fs/cifs/cifs_dfs_ref.c index fea9e898c4ba..78e4d2a3a68b 100644 --- a/fs/cifs/cifs_dfs_ref.c +++ b/fs/cifs/cifs_dfs_ref.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/dcache.h> | 15 | #include <linux/dcache.h> |
16 | #include <linux/mount.h> | 16 | #include <linux/mount.h> |
17 | #include <linux/namei.h> | 17 | #include <linux/namei.h> |
18 | #include <linux/slab.h> | ||
18 | #include <linux/vfs.h> | 19 | #include <linux/vfs.h> |
19 | #include <linux/fs.h> | 20 | #include <linux/fs.h> |
20 | #include "cifsglob.h" | 21 | #include "cifsglob.h" |
@@ -54,7 +55,7 @@ void cifs_dfs_release_automount_timer(void) | |||
54 | * Extracts sharename form full UNC. | 55 | * Extracts sharename form full UNC. |
55 | * i.e. strips from UNC trailing path that is not part of share | 56 | * i.e. strips from UNC trailing path that is not part of share |
56 | * name and fixup missing '\' in the begining of DFS node refferal | 57 | * name and fixup missing '\' in the begining of DFS node refferal |
57 | * if neccessary. | 58 | * if necessary. |
58 | * Returns pointer to share name on success or ERR_PTR on error. | 59 | * Returns pointer to share name on success or ERR_PTR on error. |
59 | * Caller is responsible for freeing returned string. | 60 | * Caller is responsible for freeing returned string. |
60 | */ | 61 | */ |
@@ -269,7 +270,7 @@ static int add_mount_helper(struct vfsmount *newmnt, struct nameidata *nd, | |||
269 | int err; | 270 | int err; |
270 | 271 | ||
271 | mntget(newmnt); | 272 | mntget(newmnt); |
272 | err = do_add_mount(newmnt, &nd->path, nd->path.mnt->mnt_flags, mntlist); | 273 | err = do_add_mount(newmnt, &nd->path, nd->path.mnt->mnt_flags | MNT_SHRINKABLE, mntlist); |
273 | switch (err) { | 274 | switch (err) { |
274 | case 0: | 275 | case 0: |
275 | path_put(&nd->path); | 276 | path_put(&nd->path); |
@@ -371,7 +372,6 @@ cifs_dfs_follow_mountpoint(struct dentry *dentry, struct nameidata *nd) | |||
371 | if (IS_ERR(mnt)) | 372 | if (IS_ERR(mnt)) |
372 | goto out_err; | 373 | goto out_err; |
373 | 374 | ||
374 | nd->path.mnt->mnt_flags |= MNT_SHRINKABLE; | ||
375 | rc = add_mount_helper(mnt, nd, &cifs_dfs_automount_list); | 375 | rc = add_mount_helper(mnt, nd, &cifs_dfs_automount_list); |
376 | 376 | ||
377 | out: | 377 | out: |