David Sterba 1686570265 btrfs: handle directory and dentry mismatch in btrfs_may_delete()
The helper btrfs_may_delete() is a copy of generic fs/namei.c:may_delete()
to verify various conditions before deletion. There's a BUG_ON added
before linux.git started, we can turn it to a proper error handling
at least in our local helper. A mistmatch between directory and the
deleted dentry is clearly invalid.

This won't be probably ever hit due to the way how the parameters are
set from the caller btrfs_ioctl_snap_destroy(), using a VFS helper
lookup_one().

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2024-03-04 16:24:47 +01:00
..
2024-03-04 16:24:46 +01:00
2023-01-19 09:24:27 +01:00
2023-10-30 10:42:06 -10:00
2023-10-30 10:42:06 -10:00
2024-03-04 16:24:46 +01:00
2024-03-04 16:24:46 +01:00
2024-03-04 16:24:46 +01:00
2023-08-24 16:20:18 -07:00
2024-03-04 16:24:46 +01:00
2024-03-04 16:24:46 +01:00
2024-03-04 16:24:46 +01:00
2024-01-22 13:29:42 -08:00
2024-03-04 16:24:46 +01:00
2023-12-15 20:27:04 +01:00
2024-03-04 16:24:46 +01:00
2024-03-04 16:24:46 +01:00
2023-12-15 23:00:04 +01:00
2024-03-04 16:24:46 +01:00
2024-01-11 13:58:04 -08:00