diff options
-rw-r--r-- | fs/namespace.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/fs/namespace.c b/fs/namespace.c index db51ddc..63ced21 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -936,8 +936,9 @@ out_unlock: /* * recursively change the type of the mountpoint. + * noinline this do_mount helper to save do_mount stack space. */ -static int do_change_type(struct nameidata *nd, int flag) +static noinline int do_change_type(struct nameidata *nd, int flag) { struct vfsmount *m, *mnt = nd->mnt; int recurse = flag & MS_REC; @@ -960,8 +961,10 @@ static int do_change_type(struct nameidata *nd, int flag) /* * do loopback mount. + * noinline this do_mount helper to save do_mount stack space. */ -static int do_loopback(struct nameidata *nd, char *old_name, int recurse) +static noinline int do_loopback(struct nameidata *nd, char *old_name, + int recurse) { struct nameidata old_nd; struct vfsmount *mnt = NULL; @@ -1010,8 +1013,9 @@ out: * change filesystem flags. dir should be a physical root of filesystem. * If you've mounted a non-root directory somewhere and want to do remount * on it - tough luck. + * noinline this do_mount helper to save do_mount stack space. */ -static int do_remount(struct nameidata *nd, int flags, int mnt_flags, +static noinline int do_remount(struct nameidata *nd, int flags, int mnt_flags, void *data) { int err; @@ -1046,7 +1050,10 @@ static inline int tree_contains_unbindable(struct vfsmount *mnt) return 0; } -static int do_move_mount(struct nameidata *nd, char *old_name) +/* + * noinline this do_mount helper to save do_mount stack space. + */ +static noinline int do_move_mount(struct nameidata *nd, char *old_name) { struct nameidata old_nd, parent_nd; struct vfsmount *p; @@ -1121,8 +1128,9 @@ out: /* * create a new mount for userspace and request it to be added into the * namespace's tree + * noinline this do_mount helper to save do_mount stack space. */ -static int do_new_mount(struct nameidata *nd, char *type, int flags, +static noinline int do_new_mount(struct nameidata *nd, char *type, int flags, int mnt_flags, char *name, void *data) { struct vfsmount *mnt; |