From: Matt Mackall 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 Cc: Signed-off-by: Andrew Morton --- fs/namei.c | 17 ++++++----------- 1 files changed, 6 insertions(+), 11 deletions(-) diff -puN fs/namei.c~tiny-uninline-some-nameic-functions fs/namei.c --- devel/fs/namei.c~tiny-uninline-some-nameic-functions 2005-12-10 21:52:31.000000000 -0800 +++ devel-akpm/fs/namei.c 2005-12-10 21:52:31.000000000 -0800 @@ -503,7 +503,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; @@ -560,7 +560,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); } @@ -593,7 +593,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) @@ -689,7 +689,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; @@ -1292,7 +1292,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; @@ -1332,7 +1332,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) @@ -2447,11 +2447,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) { _