Skip to content

Commit

Permalink
btrfs: defrag: enable defrag for subpage case
Browse files Browse the repository at this point in the history
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 <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
  • Loading branch information
Qu Wenruo authored and David Sterba committed Oct 26, 2021
1 parent c635757 commit c22a357
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions fs/btrfs/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit c22a357

Please sign in to comment.