From: Anand Jain Date: Wed, 21 Dec 2016 07:42:08 +0000 (+0800) Subject: btrfs: btrfs_defrag_root() doesn't defrag extent root tree X-Git-Tag: v4.14-rc1~1080^2~125 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8c3e6b1f0cd1765d6aeeaa9cdb69b39cea0b6804;p=platform%2Fkernel%2Flinux-rpi3.git btrfs: btrfs_defrag_root() doesn't defrag extent root tree Since btrfs_defrag_leaves() does not support extent_root, remove its corresponding call. The user can use the file based defrag to defrag extents as of now. No change in behaviour as extent_root is explicitly skipped in btrfs_defrag_leaves and this has never worked as expected. Signed-off-by: Anand Jain Reviewed-by: David Sterba [ ehnance changelong ] Signed-off-by: David Sterba --- diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 03de93f..fe8b585 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -2613,9 +2613,6 @@ static int btrfs_ioctl_defrag(struct file *file, void __user *argp) goto out; } ret = btrfs_defrag_root(root); - if (ret) - goto out; - ret = btrfs_defrag_root(root->fs_info->extent_root); break; case S_IFREG: if (!(file->f_mode & FMODE_WRITE)) {