Re: [PATCH v4 3/4] btrfs: Refactor btrfs_ioctl_snap_destroy() by using btrfs_delete_subvolume()

2018-04-17 Thread David Sterba
On Tue, Apr 17, 2018 at 09:21:16AM +0900, Misono Tomohiro wrote: > On 2018/04/17 2:53, David Sterba wrote: > > On Wed, Apr 11, 2018 at 02:20:49PM +0900, Misono Tomohiro wrote: > >> Use btrfs_delete_subvolume() to refactor btrfs_ioctl_snap_destroy(). > >> The permission check is still done in

Re: [PATCH v4 3/4] btrfs: Refactor btrfs_ioctl_snap_destroy() by using btrfs_delete_subvolume()

2018-04-16 Thread Misono Tomohiro
On 2018/04/17 2:53, David Sterba wrote: > On Wed, Apr 11, 2018 at 02:20:49PM +0900, Misono Tomohiro wrote: >> Use btrfs_delete_subvolume() to refactor btrfs_ioctl_snap_destroy(). >> The permission check is still done in btrfs_ioctl_snap_destroy(). Also, >> call of d_delete() is still required

Re: [PATCH v4 3/4] btrfs: Refactor btrfs_ioctl_snap_destroy() by using btrfs_delete_subvolume()

2018-04-16 Thread David Sterba
On Wed, Apr 11, 2018 at 02:20:49PM +0900, Misono Tomohiro wrote: > Use btrfs_delete_subvolume() to refactor btrfs_ioctl_snap_destroy(). > The permission check is still done in btrfs_ioctl_snap_destroy(). Also, > call of d_delete() is still required since btrfs_delete_subvolume() > does not call

[PATCH v4 3/4] btrfs: Refactor btrfs_ioctl_snap_destroy() by using btrfs_delete_subvolume()

2018-04-10 Thread Misono Tomohiro
Use btrfs_delete_subvolume() to refactor btrfs_ioctl_snap_destroy(). The permission check is still done in btrfs_ioctl_snap_destroy(). Also, call of d_delete() is still required since btrfs_delete_subvolume() does not call it. As a result, btrfs_unlink_subvol() and may_destroy_subvol() become