commit 5d3843ecfd10ea300035716b7e8cb77ca7f28613
Author: Erez Zadok <[EMAIL PROTECTED]>
Date:   Fri Mar 23 13:10:46 2007 -0400

    Unionfs: Don't inline do_remount_{add,del,mode}_option
    
    gcc4 decided to inline do_remount_{add,del,mode}_option creating an 600 byte
    stack abuser on a x86_64 test box.
    
    Reported by: Josef 'Jeff' Sipek <[EMAIL PROTECTED]>
    
    Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
    Signed-off-by: Josef 'Jeff' Sipek <[EMAIL PROTECTED]>

diff --git a/fs/unionfs/lookup.c b/fs/unionfs/lookup.c
index 0572247..0fc5993 100644
--- a/fs/unionfs/lookup.c
+++ b/fs/unionfs/lookup.c
@@ -30,7 +30,7 @@ static int is_validname(const char *name)
 }
 
 /* The rest of these are utility functions for lookup. */
-static int is_opaque_dir(struct dentry *dentry, int bindex)
+static noinline int is_opaque_dir(struct dentry *dentry, int bindex)
 {
        int err = 0;
        struct dentry *hidden_dentry;
diff --git a/fs/unionfs/super.c b/fs/unionfs/super.c
index ec5706b..e6a6cc1 100644
--- a/fs/unionfs/super.c
+++ b/fs/unionfs/super.c
@@ -148,9 +148,9 @@ static int unionfs_statfs(struct dentry *dentry, struct 
kstatfs *buf)
 }
 
 /* handle mode changing during remount */
-static int do_remount_mode_option(char *optarg, int cur_branches,
-                                 struct unionfs_data *new_data,
-                                 struct path *new_lower_paths)
+static noinline int do_remount_mode_option(char *optarg, int cur_branches,
+                                          struct unionfs_data *new_data,
+                                          struct path *new_lower_paths)
 {
        int err = -EINVAL;
        int perms, idx;
@@ -207,9 +207,9 @@ out:
 }
 
 /* handle branch deletion during remount */
-static int do_remount_del_option(char *optarg, int cur_branches,
-                                struct unionfs_data *new_data,
-                                struct path *new_lower_paths)
+static noinline int do_remount_del_option(char *optarg, int cur_branches,
+                                         struct unionfs_data *new_data,
+                                         struct path *new_lower_paths)
 {
        int err = -EINVAL;
        int idx;
@@ -268,10 +268,10 @@ out:
 }
 
 /* handle branch insertion during remount */
-static int do_remount_add_option(char *optarg, int cur_branches,
-                                struct unionfs_data *new_data,
-                                struct path *new_lower_paths,
-                                int *high_branch_id)
+static noinline int do_remount_add_option(char *optarg, int cur_branches,
+                                         struct unionfs_data *new_data,
+                                         struct path *new_lower_paths,
+                                         int *high_branch_id)
 {
        int err = -EINVAL;
        int perms;
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs

Reply via email to