diff options
author | Josh Triplett <josh@joshtriplett.org> | 2021-06-07 22:15:08 +0300 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2021-06-24 17:22:36 +0300 |
commit | e9f9f61d0cdcb7f0b0b5feb2d84aa1c5894751f3 (patch) | |
tree | e3528f44a11d573a30ca88c6d7f53ebfe5c7bc79 /fs/ext4/resize.c | |
parent | 310c097c2bdbea253d6ee4e064f3e65580ef93ac (diff) | |
download | linux-e9f9f61d0cdcb7f0b0b5feb2d84aa1c5894751f3.tar.xz |
ext4: consolidate checks for resize of bigalloc into ext4_resize_begin
Two different places checked for attempts to resize a filesystem with
the bigalloc feature. Move the check into ext4_resize_begin, which both
places already call.
Signed-off-by: Josh Triplett <josh@joshtriplett.org>
Link: https://lore.kernel.org/r/bee03303d999225ecb3bfa5be8576b2f4c6edbe6.1623093259.git.josh@joshtriplett.org
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/resize.c')
-rw-r--r-- | fs/ext4/resize.c | 5 |
1 files changed, 5 insertions, 0 deletions
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; |