[PATCH 1/4] mark sys_mount helper functions as noinline_for_stack

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Eric Sandeen
Date: Tuesday, April 22, 2008 - 8:51 am

Use the self-documenting noinline_for_stack attribute
in sys_mount helper functions.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---

Index: linux-2.6.25/fs/namespace.c
===================================================================
--- linux-2.6.25.orig/fs/namespace.c	2008-04-20 22:32:50.000000000 -0500
+++ linux-2.6.25/fs/namespace.c	2008-04-22 09:56:59.824406548 -0500
@@ -946,9 +946,8 @@ out_unlock:
 
 /*
  * recursively change the type of the mountpoint.
- * noinline this do_mount helper to save do_mount stack space.
  */
-static noinline int do_change_type(struct nameidata *nd, int flag)
+static noinline_for_stack int do_change_type(struct nameidata *nd, int flag)
 {
 	struct vfsmount *m, *mnt = nd->path.mnt;
 	int recurse = flag & MS_REC;
@@ -971,9 +970,8 @@ static noinline int do_change_type(struc
 
 /*
  * do loopback mount.
- * noinline this do_mount helper to save do_mount stack space.
  */
-static noinline int do_loopback(struct nameidata *nd, char *old_name,
+static noinline_for_stack int do_loopback(struct nameidata *nd, char *old_name,
 				int recurse)
 {
 	struct nameidata old_nd;
@@ -1023,10 +1021,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 noinline int do_remount(struct nameidata *nd, int flags, int mnt_flags,
-		      void *data)
+static noinline_for_stack int do_remount(struct nameidata *nd, int flags,
+		      int mnt_flags, void *data)
 {
 	int err;
 	struct super_block *sb = nd->path.mnt->mnt_sb;
@@ -1060,10 +1057,8 @@ static inline int tree_contains_unbindab
 	return 0;
 }
 
-/*
- * noinline this do_mount helper to save do_mount stack space.
- */
-static noinline int do_move_mount(struct nameidata *nd, char *old_name)
+static noinline_for_stack int do_move_mount(struct nameidata *nd,
+		char *old_name)
 {
 	struct nameidata old_nd;
 	struct path parent_path;
@@ -1141,10 +1136,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 noinline int do_new_mount(struct nameidata *nd, char *type, int flags,
-			int mnt_flags, char *name, void *data)
+static noinline_for_stack int do_new_mount(struct nameidata *nd, char *type,
+			int flags, int mnt_flags, char *name, void *data)
 {
 	struct vfsmount *mnt;
 

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/4] mark sys_mount helper functions as noinline_fo ..., Eric Sandeen, (Tue Apr 22, 8:51 am)
[PATCH 3/4] mark loop functions as noinline_for_stack, Eric Sandeen, (Tue Apr 22, 8:55 am)