From: Qu Wenruo Date: Fri, 6 Aug 2021 08:12:42 +0000 (+0800) Subject: btrfs: defrag: enable defrag for subpage case X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=c22a3572cbaf8c0824fbb221cc7a65fb14428cb9;p=linux.git btrfs: defrag: enable defrag for subpage case With the new infrastructure which has taken subpage into consideration, now we should be safe to allow defrag to work for subpage case. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba --- diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 502eba1081187..9eb0c1eb568e5 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -3080,12 +3080,6 @@ static int btrfs_ioctl_defrag(struct file *file, void __user *argp) goto out; } - /* Subpage defrag will be supported in later commits */ - if (root->fs_info->sectorsize < PAGE_SIZE) { - ret = -ENOTTY; - goto out; - } - switch (inode->i_mode & S_IFMT) { case S_IFDIR: if (!capable(CAP_SYS_ADMIN)) {