From: Eric Sandeen <sandeen@sandeen.net>
To: linux-kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH 1/4] mark sys_mount helper functions as noinline_for_stack
Date: Tue, 22 Apr 2008 10:51:03 -0500 [thread overview]
Message-ID: <480E0967.8070302@sandeen.net> (raw)
In-Reply-To: <480E06A6.1080803@redhat.com>
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;
next prev parent reply other threads:[~2008-04-22 15:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-22 15:39 [PATCH 0/4] mark various functions as noinline_for_stack Eric Sandeen
2008-04-22 15:51 ` Eric Sandeen [this message]
2008-04-22 15:54 ` [PATCH 2/4] mark lockdep " Eric Sandeen
2008-04-22 15:55 ` [PATCH 3/4] mark loop " Eric Sandeen
2008-04-22 15:57 ` [PATCH 4/4] mark inflate " Eric Sandeen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=480E0967.8070302@sandeen.net \
--to=sandeen@sandeen.net \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox