public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Matt Mackall <mpm@selenic.com>
To: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: [PATCH 2/15] misc: Uninline some namei.c functions
Date: Fri, 11 Nov 2005 02:35:49 -0600	[thread overview]
Message-ID: <3.282480653@selenic.com> (raw)
In-Reply-To: <2.282480653@selenic.com>

uninline various namei.c functions

add/remove: 4/0 grow/shrink: 0/13 up/down: 1077/-3632 (-2555)
function                                     old     new   delta
do_follow_link                                 -     398    +398
follow_dotdot                                  -     380    +380
may_delete                                     -     249    +249
may_create                                     -      50     +50
vfs_follow_link                              411     410      -1
sys_mknod                                    372     371      -1
page_getlink                                 176     175      -1
vfs_create                                   166     149     -17
vfs_symlink                                  140     118     -22
vfs_mknod                                    200     178     -22
vfs_mkdir                                    148     126     -22
vfs_link                                     250     227     -23
vfs_rmdir                                    331     163    -168
vfs_unlink                                   309     131    -178
open_namei                                  1683    1258    -425
vfs_rename                                   988     495    -493
__link_path_walk                            3744    1485   -2259

Signed-off-by: Matt Mackall <mpm@selenic.com>

Index: 2.6.14-misc/fs/namei.c
===================================================================
--- 2.6.14-misc.orig/fs/namei.c	2005-11-01 10:54:33.000000000 -0800
+++ 2.6.14-misc/fs/namei.c	2005-11-09 11:19:35.000000000 -0800
@@ -471,7 +471,7 @@ walk_init_root(const char *name, struct 
 	return 1;
 }
 
-static inline int __vfs_follow_link(struct nameidata *nd, const char *link)
+int vfs_follow_link(struct nameidata *nd, const char *link)
 {
 	int res = 0;
 	char *name;
@@ -528,7 +528,7 @@ static inline int __do_follow_link(struc
 		char *s = nd_get_link(nd);
 		error = 0;
 		if (s)
-			error = __vfs_follow_link(nd, s);
+			error = vfs_follow_link(nd, s);
 		if (dentry->d_inode->i_op->put_link)
 			dentry->d_inode->i_op->put_link(dentry, nd, cookie);
 	}
@@ -561,7 +561,7 @@ static inline void path_to_nameidata(str
  * Without that kind of total limit, nasty chains of consecutive
  * symlinks can cause almost arbitrarily long lookups. 
  */
-static inline int do_follow_link(struct path *path, struct nameidata *nd)
+static int do_follow_link(struct path *path, struct nameidata *nd)
 {
 	int err = -ELOOP;
 	if (current->link_count >= MAX_NESTED_LINKS)
@@ -657,7 +657,7 @@ int follow_down(struct vfsmount **mnt, s
 	return 0;
 }
 
-static inline void follow_dotdot(struct nameidata *nd)
+static void follow_dotdot(struct nameidata *nd)
 {
 	while(1) {
 		struct vfsmount *parent;
@@ -1261,7 +1261,7 @@ static inline int check_sticky(struct in
  * 10. We don't allow removal of NFS sillyrenamed files; it's handled by
  *     nfs_async_unlink().
  */
-static inline int may_delete(struct inode *dir,struct dentry *victim,int isdir)
+static int may_delete(struct inode *dir,struct dentry *victim,int isdir)
 {
 	int error;
 
@@ -1300,7 +1300,7 @@ static inline int may_delete(struct inod
  *  3. We should have write and exec permissions on dir
  *  4. We can't do it if dir is immutable (done in permission())
  */
-static inline int may_create(struct inode *dir, struct dentry *child,
+static int may_create(struct inode *dir, struct dentry *child,
 			     struct nameidata *nd)
 {
 	if (child->d_inode)
@@ -2415,11 +2415,6 @@ int generic_readlink(struct dentry *dent
 	return PTR_ERR(cookie);
 }
 
-int vfs_follow_link(struct nameidata *nd, const char *link)
-{
-	return __vfs_follow_link(nd, link);
-}
-
 /* get the link contents into pagecache */
 static char *page_getlink(struct dentry * dentry, struct page **ppage)
 {

  reply	other threads:[~2005-11-11  8:36 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-11  8:35 [PATCH 0/15] misc: Miscellaneous bits from -tiny Matt Mackall
2005-11-11  8:35 ` [PATCH 1/15] misc: Add bloat-o-meter to scripts Matt Mackall
2005-11-11  8:35   ` Matt Mackall [this message]
2005-11-11  8:35     ` [PATCH 3/15] misc: Uninline some open.c functions Matt Mackall
2005-11-11  8:35       ` [PATCH 4/15] misc: Uninline some inode.c functions Matt Mackall
2005-11-11  8:35         ` [PATCH 5/15] misc: Uninline some fslocks.c functions Matt Mackall
2005-11-11  8:35           ` [PATCH 6/15] misc: Trim non-IPX builds Matt Mackall
2005-11-11  8:35             ` [PATCH 7/15] misc: Make x86 doublefault handling optional Matt Mackall
2005-11-11  8:35               ` [PATCH 8/15] misc: Make vm86 support optional Matt Mackall
2005-11-11  8:35                 ` [PATCH 9/15] misc: Make sysenter " Matt Mackall
2005-11-11  8:35                   ` [PATCH 10/15] misc: Make *[ug]id16 " Matt Mackall
2005-11-11  8:35                     ` [PATCH 11/15] misc: Allow dropping panic text strings from kernel image Matt Mackall
2005-11-11  8:35                       ` [PATCH 12/15] misc: Configurable panic support Matt Mackall
2005-11-11  8:35                         ` [PATCH 13/15] misc: Configure ELF core dump support Matt Mackall
2005-11-11  8:35                           ` [PATCH 14/15] misc: Configurable number of supported IDE interfaces Matt Mackall
2005-11-11  8:35                             ` [PATCH 15/15] misc: Configurable support for PCI serial ports Matt Mackall
2005-11-11 11:03                               ` Geert Uytterhoeven
2006-01-07 16:50                               ` Russell King
2006-01-08  2:26                                 ` Matt Mackall
2005-11-11 10:14                             ` [PATCH 14/15] misc: Configurable number of supported IDE interfaces Bartlomiej Zolnierkiewicz
2005-11-11 17:18                               ` Matt Mackall
2005-11-11 17:34                                 ` Roman Zippel
2005-11-11 17:37                                   ` Matt Mackall
2005-11-11 17:47                                     ` Matt Mackall
2005-11-11 17:49                                     ` Roman Zippel
2005-11-11 11:03                       ` [PATCH 11/15] misc: Allow dropping panic text strings from kernel image Geert Uytterhoeven
2005-11-11 17:21                         ` Matt Mackall
2005-11-12  6:06                       ` Andrew Morton
2005-11-11 10:22                     ` [PATCH 10/15] misc: Make *[ug]id16 support optional Geert Uytterhoeven
2005-11-16 13:21                     ` Rob Landley
2005-11-16 18:01                       ` Matt Mackall
2005-12-20 15:46                         ` Zdenek Pavlas
2005-12-20 16:50                           ` Rob Landley
2005-12-21 17:30                             ` Zdenek Pavlas
2005-11-12  5:57                   ` [PATCH 9/15] misc: Make sysenter " Andrew Morton
2005-11-12  5:55                 ` [PATCH 8/15] misc: Make vm86 " Andrew Morton
2005-11-13  3:30               ` [PATCH 7/15] misc: Make x86 doublefault handling optional Andi Kleen
2005-11-16 13:13               ` Rob Landley
2005-11-16 18:21                 ` Matt Mackall
2005-11-16 19:21                   ` Scott Garfinkle
2005-11-16 19:45                     ` Adrian Bunk
2005-12-12 10:36                     ` Ingo Molnar
2005-12-12 16:22                       ` Andi Kleen
2005-12-12 15:32                         ` Matt Mackall
2005-12-13  8:39                         ` Ingo Molnar
2005-11-14  1:57             ` [PATCH 6/15] misc: Trim non-IPX builds Adrian Bunk
2005-11-18  5:22               ` [2.6 patch] move some code to net/ipx/af_ipx.c Adrian Bunk
2005-11-18 17:27                 ` Matt Mackall
2005-11-18 20:24                 ` Arnaldo Carvalho de Melo
2005-12-05 21:35                   ` Adrian Bunk

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=3.282480653@selenic.com \
    --to=mpm@selenic.com \
    --cc=akpm@osdl.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