···5151 struct inode *, struct dentry *, unsigned int);5252 int (*readlink) (struct dentry *, char __user *,int);5353 const char *(*get_link) (struct dentry *, struct inode *, void **);5454- void (*put_link) (struct inode *, void *);5554 void (*truncate) (struct inode *);5655 int (*permission) (struct inode *, int, unsigned int);5756 int (*get_acl)(struct inode *, int);···8384rename2: yes (all) (see below)8485readlink: no8586get_link: no8686-put_link: no8787setattr: yes8888permission: no (may not block if called in rcu-walk mode)8989get_acl: no
+6
Documentation/filesystems/porting
···515515 * ->get_link() gets inode as a separate argument516516 * ->get_link() may be called in RCU mode - in that case NULL517517 dentry is passed518518+--519519+[mandatory]520520+ ->get_link() gets struct delayed_call *done now, and should do521521+ set_delayed_call() where it used to set *cookie.522522+ ->put_link() is gone - just give the destructor to set_delayed_call()523523+ in ->get_link().
+10-11
Documentation/filesystems/vfs.txt
···350350 int (*rename2) (struct inode *, struct dentry *,351351 struct inode *, struct dentry *, unsigned int);352352 int (*readlink) (struct dentry *, char __user *,int);353353- const char *(*follow_link) (struct dentry *, void **);354354- void (*put_link) (struct inode *, void *);353353+ const char *(*get_link) (struct dentry *, struct inode *,354354+ struct delayed_call *);355355 int (*permission) (struct inode *, int);356356 int (*get_acl)(struct inode *, int);357357 int (*setattr) (struct dentry *, struct iattr *);···434434 readlink: called by the readlink(2) system call. Only required if435435 you want to support reading symbolic links436436437437- follow_link: called by the VFS to follow a symbolic link to the437437+ get_link: called by the VFS to follow a symbolic link to the438438 inode it points to. Only required if you want to support439439 symbolic links. This method returns the symlink body440440 to traverse (and possibly resets the current position with441441 nd_jump_link()). If the body won't go away until the inode442442 is gone, nothing else is needed; if it needs to be otherwise443443- pinned, the data needed to release whatever we'd grabbed444444- is to be stored in void * variable passed by address to445445- follow_link() instance.446446-447447- put_link: called by the VFS to release resources allocated by448448- follow_link(). The cookie stored by follow_link() is passed449449- to this method as the last parameter; only called when450450- cookie isn't NULL.443443+ pinned, arrange for its release by having get_link(..., ..., done)444444+ do set_delayed_call(done, destructor, argument).445445+ In that case destructor(argument) will be called once VFS is446446+ done with the body you've returned.447447+ May be called in RCU mode; that is indicated by NULL dentry448448+ argument. If request can't be handled without leaving RCU mode,449449+ have it return ERR_PTR(-ECHILD).451450452451 permission: called by the VFS to check for access rights on a POSIX-like453452 filesystem.