From: Linus Torvalds Date: Tue, 11 Oct 2022 02:45:17 +0000 (-0700) Subject: Merge tag 'pull-tmpfile' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=f721d24e5dae8358b49b24399d27ba5d12a7e049;p=linux.git Merge tag 'pull-tmpfile' of git://git./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 --- f721d24e5dae8358b49b24399d27ba5d12a7e049 diff --cc Documentation/filesystems/porting.rst index e8f370d9ce9c3,af138241bb4b1..df0dc37e6f582 --- a/Documentation/filesystems/porting.rst +++ b/Documentation/filesystems/porting.rst @@@ -925,11 -925,10 +925,21 @@@ should be done by looking at FMODE_LSEE --- +*mandatory* + +filldir_t (readdir callbacks) calling conventions have changed. Instead of +returning 0 or -E... it returns bool now. false means "no more" (as -E... used +to) and true - "keep going" (as 0 in old calling conventions). Rationale: +callers never looked at specific -E... values anyway. ->iterate() and +->iterate_shared() instance require no changes at all, all filldir_t ones in +the tree converted. ++ ++--- ++ + **mandatory** + + Calling conventions for ->tmpfile() have changed. It now takes a struct + file pointer instead of struct dentry pointer. d_tmpfile() is similarly + changed to simplify callers. The passed file is in a non-open state and on + success must be opened before returning (e.g. by calling + finish_open_simple()). diff --cc fs/overlayfs/super.c index 9ca98bea8e187,7837223689c15..a29a8afe9b262 --- a/fs/overlayfs/super.c +++ b/fs/overlayfs/super.c @@@ -1366,10 -1354,11 +1367,11 @@@ static int ovl_create_volatile_dirty(st } static int ovl_make_workdir(struct super_block *sb, struct ovl_fs *ofs, - struct path *workpath) + const struct path *workpath) { struct vfsmount *mnt = ovl_upper_mnt(ofs); - struct dentry *temp, *workdir; + struct dentry *workdir; + struct file *tmpfile; bool rename_whiteout; bool d_type; int fh_type;