Skip to content

Commit

Permalink
[PATCH] Mark some key VFS functions as __always_inline
Browse files Browse the repository at this point in the history
Mark a few VFS functions as mandatory inline (based on Al Viro's request);
these must be inline due to stack usage issues during a recursive loop that
happens during the recursive symlink resolution (symlink to a symlink to a
symlink ..)

This patch at this point does not change behavior and is for documentation
purposes only (but this changes later in the series)

Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Arjan van de Ven authored and Linus Torvalds committed Jan 15, 2006
1 parent 652050a commit f166235
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ static struct dentry * real_lookup(struct dentry * parent, struct qstr * name, s
static int __emul_lookup_dentry(const char *, struct nameidata *);

/* SMP-safe */
static inline int
static __always_inline int
walk_init_root(const char *name, struct nameidata *nd)
{
read_lock(&current->fs->lock);
Expand All @@ -504,7 +504,7 @@ walk_init_root(const char *name, struct nameidata *nd)
return 1;
}

static inline int __vfs_follow_link(struct nameidata *nd, const char *link)
static __always_inline int __vfs_follow_link(struct nameidata *nd, const char *link)
{
int res = 0;
char *name;
Expand Down Expand Up @@ -544,7 +544,7 @@ struct path {
struct dentry *dentry;
};

static inline int __do_follow_link(struct path *path, struct nameidata *nd)
static __always_inline int __do_follow_link(struct path *path, struct nameidata *nd)
{
int error;
void *cookie;
Expand Down Expand Up @@ -690,7 +690,7 @@ int follow_down(struct vfsmount **mnt, struct dentry **dentry)
return 0;
}

static inline void follow_dotdot(struct nameidata *nd)
static __always_inline void follow_dotdot(struct nameidata *nd)
{
while(1) {
struct vfsmount *parent;
Expand Down

0 comments on commit f166235

Please sign in to comment.