changelog:
v2 -> v3 ... use if-else block instead of two if blocks and
add Tested-by tag in 2nd patch
v1 -> v2 ... split the patch to hopefully make review easier
Note: I will send a xfstest if this series is merged.
1st patch is a preparation work just moving the declaration of
may_destroy_subvol().
2nd patch is the main part. New function btrfs_delete_subvolume() is
introduced and used in btrfs_rmdir() when a direcoty is an empty
subvolume. The function is almost the copy of second half of
btrfs_ioctl_snap_destroy().
The code path for "sub delete" is not changed yet.
3rd patch is a cleanup of btrfs_ioctl_snap_destroy() and uses
brrfs_delete_subvolume() for "sub delete" too.
Tomohiro Misono (3):
btrfs: move may_destroy_subvol() from ioctl.c to inode.c
btrfs: Allow rmdir(2) to delete a subvolume
btrfs: cleanup btrfs_ioctl_snap_destroy() by using
btrfs_delete_subvolume()
fs/btrfs/ctree.h | 5 +-
fs/btrfs/inode.c | 197 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-
fs/btrfs/ioctl.c | 185 +--------------------------------------------------
3 files changed, 198 insertions(+), 189 deletions(-)
--
2.14.3
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html