diff options
author | ruippan (潘睿) <ruippan@tencent.com> | 2018-12-04 09:04:12 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-01-09 19:14:49 +0300 |
commit | 0bf8b3fdac08bc0bc15f854faab6f8c3b607a430 (patch) | |
tree | bda988f6c540f7c6562e8cb4cee07320c5b12029 /fs/ext4/resize.c | |
parent | 92bb9b067bda14377d44c86ae5af06143e436245 (diff) | |
download | linux-0bf8b3fdac08bc0bc15f854faab6f8c3b607a430.tar.xz |
ext4: fix EXT4_IOC_GROUP_ADD ioctl
commit e647e29196b7f802f8242c39ecb7cc937f5ef217 upstream.
Commit e2b911c53584 ("ext4: clean up feature test macros with
predicate functions") broke the EXT4_IOC_GROUP_ADD ioctl. This was
not noticed since only very old versions of resize2fs (before
e2fsprogs 1.42) use this ioctl. However, using a new kernel with an
enterprise Linux userspace will cause attempts to use online resize to
fail with "No reserved GDT blocks".
Fixes: e2b911c53584 ("ext4: clean up feature test macros with predicate...")
Cc: stable@kernel.org # v4.4
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: ruippan (潘睿) <ruippan@tencent.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/ext4/resize.c')
-rw-r--r-- | fs/ext4/resize.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c index a5cd9e8e5e09..703b516366fd 100644 --- a/fs/ext4/resize.c +++ b/fs/ext4/resize.c @@ -1602,7 +1602,7 @@ int ext4_group_add(struct super_block *sb, struct ext4_new_group_data *input) } if (reserved_gdb || gdb_off == 0) { - if (ext4_has_feature_resize_inode(sb) || + if (!ext4_has_feature_resize_inode(sb) || !le16_to_cpu(es->s_reserved_gdt_blocks)) { ext4_warning(sb, "No reserved GDT blocks, can't resize"); |