diff options
| author | Al Viro <viro@zeniv.linux.org.uk> | 2015-05-11 08:29:30 -0400 |
|---|---|---|
| committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-05-15 01:10:36 -0400 |
| commit | 203bc643db59e2538e9a3f19be1636cdfd2bb2db (patch) | |
| tree | 370610d82cc68a796c8a48eda8b70ba1171039d5 /Documentation | |
| parent | 8f47a0167c567de4ef552e26101b4f54a9b8ad48 (diff) | |
update Documentation/filesystems/ regarding the follow_link/put_link changes
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'Documentation')
| -rw-r--r-- | Documentation/filesystems/porting | 17 | ||||
| -rw-r--r-- | Documentation/filesystems/vfs.txt | 18 |
2 files changed, 27 insertions, 8 deletions
diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting index e69274de8d0c..3eae250254d5 100644 --- a/Documentation/filesystems/porting +++ b/Documentation/filesystems/porting | |||
| @@ -483,3 +483,20 @@ in your dentry operations instead. | |||
| 483 | -- | 483 | -- |
| 484 | [mandatory] | 484 | [mandatory] |
| 485 | ->aio_read/->aio_write are gone. Use ->read_iter/->write_iter. | 485 | ->aio_read/->aio_write are gone. Use ->read_iter/->write_iter. |
| 486 | --- | ||
| 487 | [recommended] | ||
| 488 | for embedded ("fast") symlinks just set inode->i_link to wherever the | ||
| 489 | symlink body is and use simple_follow_link() as ->follow_link(). | ||
| 490 | -- | ||
| 491 | [mandatory] | ||
| 492 | calling conventions for ->follow_link() have changed. Instead of returning | ||
| 493 | cookie and using nd_set_link() to store the body to traverse, we return | ||
| 494 | the body to traverse and store the cookie using explicit void ** argument. | ||
| 495 | nameidata isn't passed at all - nd_jump_link() doesn't need it and | ||
| 496 | nd_[gs]et_link() is gone. | ||
| 497 | -- | ||
| 498 | [mandatory] | ||
| 499 | calling conventions for ->put_link() have changed. It gets inode instead of | ||
| 500 | dentry, it does not get nameidata at all and it gets called only when cookie | ||
| 501 | is non-NULL. Note that link body isn't available anymore, so if you need it, | ||
| 502 | store it as cookie. | ||
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt index 542d9352d0f2..b403b29ef710 100644 --- a/Documentation/filesystems/vfs.txt +++ b/Documentation/filesystems/vfs.txt | |||
| @@ -436,16 +436,18 @@ otherwise noted. | |||
| 436 | 436 | ||
| 437 | follow_link: called by the VFS to follow a symbolic link to the | 437 | follow_link: called by the VFS to follow a symbolic link to the |
| 438 | inode it points to. Only required if you want to support | 438 | inode it points to. Only required if you want to support |
| 439 | symbolic links. This method returns a void pointer cookie | 439 | symbolic links. This method returns the symlink body |
| 440 | that is passed to put_link(). | 440 | to traverse (and possibly resets the current position with |
| 441 | nd_jump_link()). If the body won't go away until the inode | ||
| 442 | is gone, nothing else is needed; if it needs to be otherwise | ||
| 443 | pinned, the data needed to release whatever we'd grabbed | ||
| 444 | is to be stored in void * variable passed by address to | ||
| 445 | follow_link() instance. | ||
| 441 | 446 | ||
| 442 | put_link: called by the VFS to release resources allocated by | 447 | put_link: called by the VFS to release resources allocated by |
| 443 | follow_link(). The cookie returned by follow_link() is passed | 448 | follow_link(). The cookie stored by follow_link() is passed |
| 444 | to this method as the last parameter. It is used by | 449 | to this method as the last parameter; only called when |
| 445 | filesystems such as NFS where page cache is not stable | 450 | cookie isn't NULL. |
| 446 | (i.e. page that was installed when the symbolic link walk | ||
| 447 | started might not be in the page cache at the end of the | ||
| 448 | walk). | ||
| 449 | 451 | ||
| 450 | permission: called by the VFS to check for access rights on a POSIX-like | 452 | permission: called by the VFS to check for access rights on a POSIX-like |
| 451 | filesystem. | 453 | filesystem. |
