diff options
| author | Christian Brauner <brauner@kernel.org> | 2025-09-23 12:37:42 +0200 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2025-09-23 12:37:42 +0200 |
| commit | 4f5ea5aa0dcdd3c7487fbabad5b86b3cd7d2b8c4 (patch) | |
| tree | dbbc2e7ef0748cb17048ab8c660e4070b1dd6ae9 /fs/bcachefs/fs-ioctl.c | |
| parent | 8f5ae30d69d7543eee0d70083daf4de8fe15d585 (diff) | |
| parent | 0a2c70594704b199849e8add59263fc98e057a63 (diff) | |
Merge patch series "vfs: preparatory changes to centralize locking of create/remove/rename"
NeilBrown <neilb@ownmail.net> says:
This is a re-re-revised selection of cleanups and API renaming which
continues my work to centralise locking of create/remove/rename
operations.
* patches from https://lore.kernel.org/20250922043121.193821-2-neilb@ownmail.net:
debugfs: rename start_creating() to debugfs_start_creating()
VFS: rename kern_path_locked() and related functions.
VFS/audit: introduce kern_path_parent() for audit
VFS: unify old_mnt_idmap and new_mnt_idmap in renamedata
VFS: discard err2 in filename_create()
VFS/ovl: add lookup_one_positive_killable()
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/bcachefs/fs-ioctl.c')
| -rw-r--r-- | fs/bcachefs/fs-ioctl.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/fs/bcachefs/fs-ioctl.c b/fs/bcachefs/fs-ioctl.c index 4e72e654da96..43510da5e734 100644 --- a/fs/bcachefs/fs-ioctl.c +++ b/fs/bcachefs/fs-ioctl.c @@ -255,7 +255,7 @@ static long bch2_ioctl_subvolume_create(struct bch_fs *c, struct file *filp, snapshot_src = inode_inum(to_bch_ei(src_path.dentry->d_inode)); } - dst_dentry = user_path_create(arg.dirfd, + dst_dentry = start_creating_user_path(arg.dirfd, (const char __user *)(unsigned long)arg.dst_ptr, &dst_path, lookup_flags); error = PTR_ERR_OR_ZERO(dst_dentry); @@ -314,7 +314,7 @@ static long bch2_ioctl_subvolume_create(struct bch_fs *c, struct file *filp, d_instantiate(dst_dentry, &inode->v); fsnotify_mkdir(dir, dst_dentry); err3: - done_path_create(&dst_path, dst_dentry); + end_creating_path(&dst_path, dst_dentry); err2: if (arg.src_ptr) path_put(&src_path); @@ -334,7 +334,7 @@ static long bch2_ioctl_subvolume_destroy(struct bch_fs *c, struct file *filp, if (arg.flags) return -EINVAL; - victim = user_path_locked_at(arg.dirfd, name, &path); + victim = start_removing_user_path_at(arg.dirfd, name, &path); if (IS_ERR(victim)) return PTR_ERR(victim); @@ -351,9 +351,7 @@ static long bch2_ioctl_subvolume_destroy(struct bch_fs *c, struct file *filp, d_invalidate(victim); } err: - inode_unlock(dir); - dput(victim); - path_put(&path); + end_removing_path(&path, victim); return ret; } |