aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hostfs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-06-22 15:51:21 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-06-22 15:51:21 -0400
commit052b398a43a7de8c68c13e7fa05d6b3d16ce6801 (patch)
tree8b7ee72d0617daf55083bc9cbc904ee22cb953db /fs/hostfs
parentb953c0d234bc72e8489d3bf51a276c5c4ec85345 (diff)
parentb853a16176cf3e02c57e215743015614152c2428 (diff)
Merge branch 'for-linus-1' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs updates from Al Viro: "In this pile: pathname resolution rewrite. - recursion in link_path_walk() is gone. - nesting limits on symlinks are gone (the only limit remaining is that the total amount of symlinks is no more than 40, no matter how nested). - "fast" (inline) symlinks are handled without leaving rcuwalk mode. - stack footprint (independent of the nesting) is below kilobyte now, about on par with what it used to be with one level of nested symlinks and ~2.8 times lower than it used to be in the worst case. - struct nameidata is entirely private to fs/namei.c now (not even opaque pointers are being passed around). - ->follow_link() and ->put_link() calling conventions had been changed; all in-tree filesystems converted, out-of-tree should be able to follow reasonably easily. For out-of-tree conversions, see Documentation/filesystems/porting for details (and in-tree filesystems for examples of conversion). That has sat in -next since mid-May, seems to survive all testing without regressions and merges clean with v4.1" * 'for-linus-1' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (131 commits) turn user_{path_at,path,lpath,path_dir}() into static inlines namei: move saved_nd pointer into struct nameidata inline user_path_create() inline user_path_parent() namei: trim do_last() arguments namei: stash dfd and name into nameidata namei: fold path_cleanup() into terminate_walk() namei: saner calling conventions for filename_parentat() namei: saner calling conventions for filename_create() namei: shift nameidata down into filename_parentat() namei: make filename_lookup() reject ERR_PTR() passed as name namei: shift nameidata inside filename_lookup() namei: move putname() call into filename_lookup() namei: pass the struct path to store the result down into path_lookupat() namei: uninline set_root{,_rcu}() namei: be careful with mountpoint crossings in follow_dotdot_rcu() Documentation: remove outdated information from automount-support.txt get rid of assorted nameidata-related debris lustre: kill unused helper lustre: kill unused macro (LOOKUP_CONTINUE) ...
Diffstat (limited to 'fs/hostfs')
-rw-r--r--fs/hostfs/hostfs_kern.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c
index 07d8d8f52faf..059597b23f67 100644
--- a/fs/hostfs/hostfs_kern.c
+++ b/fs/hostfs/hostfs_kern.c
@@ -892,7 +892,7 @@ static const struct inode_operations hostfs_dir_iops = {
892 .setattr = hostfs_setattr, 892 .setattr = hostfs_setattr,
893}; 893};
894 894
895static void *hostfs_follow_link(struct dentry *dentry, struct nameidata *nd) 895static const char *hostfs_follow_link(struct dentry *dentry, void **cookie)
896{ 896{
897 char *link = __getname(); 897 char *link = __getname();
898 if (link) { 898 if (link) {
@@ -906,21 +906,18 @@ static void *hostfs_follow_link(struct dentry *dentry, struct nameidata *nd)
906 } 906 }
907 if (err < 0) { 907 if (err < 0) {
908 __putname(link); 908 __putname(link);
909 link = ERR_PTR(err); 909 return ERR_PTR(err);
910 } 910 }
911 } else { 911 } else {
912 link = ERR_PTR(-ENOMEM); 912 return ERR_PTR(-ENOMEM);
913 } 913 }
914 914
915 nd_set_link(nd, link); 915 return *cookie = link;
916 return NULL;
917} 916}
918 917
919static void hostfs_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie) 918static void hostfs_put_link(struct inode *unused, void *cookie)
920{ 919{
921 char *s = nd_get_link(nd); 920 __putname(cookie);
922 if (!IS_ERR(s))
923 __putname(s);
924} 921}
925 922
926static const struct inode_operations hostfs_link_iops = { 923static const struct inode_operations hostfs_link_iops = {