Commit c22a3572 authored by Qu Wenruo's avatar Qu Wenruo Committed by David Sterba

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: default avatarQu Wenruo <wqu@suse.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent c6357573
......@@ -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)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment