linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Christoph Hellwig <hch@lst.de>
Cc: viro@parcelfarce.linux.theplanet.co.uk, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] factor out common code around ->follow_link invocation
Date: Thu, 13 Jan 2005 16:06:34 -0800	[thread overview]
Message-ID: <20050113160634.0fd416b7.akpm@osdl.org> (raw)
In-Reply-To: <20050113165353.GB24377@lst.de>

Christoph Hellwig <hch@lst.de> wrote:
>
> +static inline int __do_follow_link(struct dentry *dentry, struct nameidata *nd)

Now there's a fairly insane amount of inlining going on around
do_follow_link() and __do_follow_link().  It makes my fingers itchy.

ow.  __do_follow_link inlines __vfs_follow_link inlines walk_init_root and
__do_follow_link has maybe three callsites.

This:

--- 25/fs/namei.c~namei-uninlining	Thu Jan 13 16:01:24 2005
+++ 25-akpm/fs/namei.c	Thu Jan 13 16:04:21 2005
@@ -447,7 +447,7 @@ walk_init_root(const char *name, struct 
 	return 1;
 }
 
-static inline int __vfs_follow_link(struct nameidata *nd, const char *link)
+static int __vfs_follow_link(struct nameidata *nd, const char *link)
 {
 	int res = 0;
 	char *name;
@@ -482,7 +482,7 @@ fail:
 	return PTR_ERR(link);
 }
 
-static inline int __do_follow_link(struct dentry *dentry, struct nameidata *nd)
+static int __do_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
 	int error;
 
@@ -507,7 +507,7 @@ static inline int __do_follow_link(struc
  * Without that kind of total limit, nasty chains of consecutive
  * symlinks can cause almost arbitrarily long lookups. 
  */
-static inline int do_follow_link(struct dentry *dentry, struct nameidata *nd)
+static int do_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
 	int err = -ELOOP;
 	if (current->link_count >= MAX_NESTED_LINKS)


does this:

   text    data     bss     dec     hex filename
  16602      96       0   16698    413a fs/namei.o
  14986      96       0   15082    3aea fs/namei.o

Is it still the case that we need inlining in the link-following code to
prevent stack windup?  If so, some commentary is needed to protect it. 
what are the guidelines?

  parent reply	other threads:[~2005-01-14  0:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-13 16:53 [PATCH] factor out common code around ->follow_link invocation Christoph Hellwig
2005-01-13 18:35 ` file system writes jenn
2005-01-13 21:31   ` Jan Hudec
2005-01-14  0:11     ` jenn
2005-01-14  0:06 ` Andrew Morton [this message]
2005-01-14  0:21   ` [PATCH] factor out common code around ->follow_link invocation Al Viro
2005-01-14  0:34     ` Andrew Morton
2005-01-14  0:38       ` Al Viro

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=20050113160634.0fd416b7.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=hch@lst.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=viro@parcelfarce.linux.theplanet.co.uk \
    /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;
as well as URLs for NNTP newsgroup(s).