diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2018-07-10 02:20:08 +0300 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2018-07-12 17:04:29 +0300 |
commit | 5014c2f378ca3f6ddfe310e4b5ef7027acfc2d45 (patch) | |
tree | c0b611b4ee8b95d56d24ac3421fbe1717edf6f7d /Documentation | |
parent | ee1904ba44bd4a242b453e8fe179b374906da173 (diff) | |
download | linux-5014c2f378ca3f6ddfe310e4b5ef7027acfc2d45.tar.xz |
document alloc_file() changes
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/filesystems/porting | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting index c68ea9294b5f..7b7b845c490a 100644 --- a/Documentation/filesystems/porting +++ b/Documentation/filesystems/porting @@ -610,3 +610,15 @@ in your dentry operations instead. value for 'called finish_no_open(), open it yourself' case has become 0, not 1. Since finish_no_open() itself is returning 0 now, that part does not need any changes in ->atomic_open() instances. +-- +[mandatory] + alloc_file() has become static now; two wrappers are to be used instead. + alloc_file_pseudo(inode, vfsmount, name, flags, ops) is for the cases + when dentry needs to be created; that's the majority of old alloc_file() + users. Calling conventions: on success a reference to new struct file + is returned and callers reference to inode is subsumed by that. On + failure, ERR_PTR() is returned and no caller's references are affected, + so the caller needs to drop the inode reference it held. + alloc_file_clone(file, flags, ops) does not affect any caller's references. + On success you get a new struct file sharing the mount/dentry with the + original, on failure - ERR_PTR(). |