Skip to content

Commit

Permalink
ext4: fix EXT4_IOC_GROUP_ADD ioctl
Browse files Browse the repository at this point in the history
Commit e2b911c ("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: e2b911c ("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>
  • Loading branch information
ruippan (潘睿) authored and Theodore Ts'o committed Dec 4, 2018
1 parent 361d24d commit e647e29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/ext4/resize.c
Original file line number Diff line number Diff line change
Expand Up @@ -1631,7 +1631,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");
Expand Down

0 comments on commit e647e29

Please sign in to comment.