aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/ext4/ioctl.c14
-rw-r--r--fs/ext4/resize.c5
2 files changed, 5 insertions, 14 deletions
diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c
index 5730aeca563c..e27f34bceb8d 100644
--- a/fs/ext4/ioctl.c
+++ b/fs/ext4/ioctl.c
@@ -692,13 +692,6 @@ static long ext4_ioctl_group_add(struct file *file,
if (err)
return err;
- if (ext4_has_feature_bigalloc(sb)) {
- ext4_msg(sb, KERN_ERR,
- "Online resizing not supported with bigalloc");
- err = -EOPNOTSUPP;
- goto group_add_out;
- }
-
err = mnt_want_write_file(file);
if (err)
goto group_add_out;
@@ -921,13 +914,6 @@ setversion_out:
goto group_extend_out;
}
- if (ext4_has_feature_bigalloc(sb)) {
- ext4_msg(sb, KERN_ERR,
- "Online resizing not supported with bigalloc");
- err = -EOPNOTSUPP;
- goto group_extend_out;
- }
-
err = mnt_want_write_file(filp);
if (err)
goto group_extend_out;
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c
index bd0d185654f3..d13bb9e76482 100644
--- a/fs/ext4/resize.c
+++ b/fs/ext4/resize.c
@@ -74,6 +74,11 @@ int ext4_resize_begin(struct super_block *sb)
return -EPERM;
}
+ if (ext4_has_feature_bigalloc(sb)) {
+ ext4_msg(sb, KERN_ERR, "Online resizing not supported with bigalloc");
+ return -EOPNOTSUPP;
+ }
+
if (test_and_set_bit_lock(EXT4_FLAGS_RESIZING,
&EXT4_SB(sb)->s_ext4_flags))
ret = -EBUSY;