diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-10-11 04:45:17 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-10-11 04:45:17 +0200 |
commit | f721d24e5dae8358b49b24399d27ba5d12a7e049 (patch) | |
tree | 090ee47954571f1e9c980c75699e24d5507c2749 /fs/dcache.c | |
parent | Merge tag 'mm-stable-2022-10-08' of git://git.kernel.org/pub/scm/linux/kernel... (diff) | |
parent | fuse: implement ->tmpfile() (diff) | |
download | linux-f721d24e5dae8358b49b24399d27ba5d12a7e049.tar.xz linux-f721d24e5dae8358b49b24399d27ba5d12a7e049.zip |
Merge tag 'pull-tmpfile' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs tmpfile updates from Al Viro:
"Miklos' ->tmpfile() signature change; pass an unopened struct file to
it, let it open the damn thing. Allows to add tmpfile support to FUSE"
* tag 'pull-tmpfile' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
fuse: implement ->tmpfile()
vfs: open inside ->tmpfile()
vfs: move open right after ->tmpfile()
vfs: make vfs_tmpfile() static
ovl: use vfs_tmpfile_open() helper
cachefiles: use vfs_tmpfile_open() helper
cachefiles: only pass inode to *mark_inode_inuse() helpers
cachefiles: tmpfile error handling cleanup
hugetlbfs: cleanup mknod and tmpfile
vfs: add vfs_tmpfile_open() helper
Diffstat (limited to 'fs/dcache.c')
-rw-r--r-- | fs/dcache.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/dcache.c b/fs/dcache.c index 2ee8636016ee..52e6d5fdab6b 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -3249,8 +3249,10 @@ void d_genocide(struct dentry *parent) EXPORT_SYMBOL(d_genocide); -void d_tmpfile(struct dentry *dentry, struct inode *inode) +void d_tmpfile(struct file *file, struct inode *inode) { + struct dentry *dentry = file->f_path.dentry; + inode_dec_link_count(inode); BUG_ON(dentry->d_name.name != dentry->d_iname || !hlist_unhashed(&dentry->d_u.d_alias) || |