From 8c3e6b1f0cd1765d6aeeaa9cdb69b39cea0b6804 Mon Sep 17 00:00:00 2001 From: Anand Jain Date: Wed, 21 Dec 2016 15:42:08 +0800 Subject: [PATCH] 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 --- fs/btrfs/ioctl.c | 3 --- 1 file changed, 3 deletions(-) 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)) { -- 2.7.4