aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/filesystems
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2015-11-17 10:20:54 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2015-12-08 22:41:54 -0500
commit6b2553918d8b4e6de9853fd6315bec7271a2e592 (patch)
tree85540dcb0dc0de3d67c68d0aa7b17058f4e96539 /Documentation/filesystems
parent21fc61c73c3903c4c312d0802da01ec2b323d174 (diff)
replace ->follow_link() with new method that could stay in RCU mode
new method: ->get_link(); replacement of ->follow_link(). The differences are: * inode and dentry are passed separately * might be called both in RCU and non-RCU mode; the former is indicated by passing it a NULL dentry. * when called that way it isn't allowed to block and should return ERR_PTR(-ECHILD) if it needs to be called in non-RCU mode. It's a flagday change - the old method is gone, all in-tree instances converted. Conversion isn't hard; said that, so far very few instances do not immediately bail out when called in RCU mode. That'll change in the next commits. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'Documentation/filesystems')
-rw-r--r--Documentation/filesystems/Locking4
-rw-r--r--Documentation/filesystems/porting6
2 files changed, 8 insertions, 2 deletions
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking
index 06d443450f21..4fba54b9fcec 100644
--- a/Documentation/filesystems/Locking
+++ b/Documentation/filesystems/Locking
@@ -50,7 +50,7 @@ prototypes:
50 int (*rename2) (struct inode *, struct dentry *, 50 int (*rename2) (struct inode *, struct dentry *,
51 struct inode *, struct dentry *, unsigned int); 51 struct inode *, struct dentry *, unsigned int);
52 int (*readlink) (struct dentry *, char __user *,int); 52 int (*readlink) (struct dentry *, char __user *,int);
53 const char *(*follow_link) (struct dentry *, void **); 53 const char *(*get_link) (struct dentry *, struct inode *, void **);
54 void (*put_link) (struct inode *, void *); 54 void (*put_link) (struct inode *, void *);
55 void (*truncate) (struct inode *); 55 void (*truncate) (struct inode *);
56 int (*permission) (struct inode *, int, unsigned int); 56 int (*permission) (struct inode *, int, unsigned int);
@@ -83,7 +83,7 @@ rmdir: yes (both) (see below)
83rename: yes (all) (see below) 83rename: yes (all) (see below)
84rename2: yes (all) (see below) 84rename2: yes (all) (see below)
85readlink: no 85readlink: no
86follow_link: no 86get_link: no
87put_link: no 87put_link: no
88setattr: yes 88setattr: yes
89permission: no (may not block if called in rcu-walk mode) 89permission: no (may not block if called in rcu-walk mode)
diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting
index 3eb7c35c9698..cf92a8c55594 100644
--- a/Documentation/filesystems/porting
+++ b/Documentation/filesystems/porting
@@ -509,3 +509,9 @@ in your dentry operations instead.
509 any symlink that might use page_follow_link_light/page_put_link() must 509 any symlink that might use page_follow_link_light/page_put_link() must
510 have inode_nohighmem(inode) called before anything might start playing with 510 have inode_nohighmem(inode) called before anything might start playing with
511 its pagecache. 511 its pagecache.
512--
513[mandatory]
514 ->follow_link() is replaced with ->get_link(); same API, except that
515 * ->get_link() gets inode as a separate argument
516 * ->get_link() may be called in RCU mode - in that case NULL
517 dentry is passed