diff options
| author | Filipe Manana <fdmanana@suse.com> | 2026-01-13 12:39:52 +0000 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2026-01-14 17:17:47 +0100 |
| commit | 5f84a1092dee7b2687804d71c0dd50edd6f2d32a (patch) | |
| tree | afaaede508da16b102b7657b3658d2a3a50a7f2b /include/linux/openvswitch.h | |
| parent | 26aab3a485d500cb89ef7340797982bd066f63a5 (diff) | |
btrfs: use may_delete_dentry() in btrfs_ioctl_snap_destroy()
There is no longer the need to use btrfs_may_delete(), which was a copy
of the VFS private function may_delete(), since now that functionality
is exported by the VFS as a function named may_delete_dentry(). In fact
our local copy of may_delete() lacks an update that happened to that
function which is point number 7 in that function's comment:
"7. If the victim has an unknown uid or gid we can't change the inode."
which corresponds to this code:
/* Inode writeback is not safe when the uid or gid are invalid. */
if (!vfsuid_valid(i_uid_into_vfsuid(idmap, inode)) ||
!vfsgid_valid(i_gid_into_vfsgid(idmap, inode)))
return -EOVERFLOW;
As long as we keep a separate copy, duplicating code, we are also prone
to updates to the VFS being missed in our local copy.
So change btrfs_ioctl_snap_destroy() to use the VFS function and remove
btrfs_may_delete().
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Link: https://patch.msgid.link/46b13dc5c957deb72a7f085916757a20878a8e73.1768307858.git.fdmanana@suse.com
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'include/linux/openvswitch.h')
0 files changed, 0 insertions, 0 deletions
