diff options
Diffstat (limited to 'fs/ext4/resize.c')
| -rw-r--r-- | fs/ext4/resize.c | 10 | 
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c index 90a941d20dff..8b70a4701293 100644 --- a/fs/ext4/resize.c +++ b/fs/ext4/resize.c @@ -54,6 +54,16 @@ int ext4_resize_begin(struct super_block *sb)  		return -EPERM;  	/* +	 * If the reserved GDT blocks is non-zero, the resize_inode feature +	 * should always be set. +	 */ +	if (EXT4_SB(sb)->s_es->s_reserved_gdt_blocks && +	    !ext4_has_feature_resize_inode(sb)) { +		ext4_error(sb, "resize_inode disabled but reserved GDT blocks non-zero"); +		return -EFSCORRUPTED; +	} + +	/*  	 * If we are not using the primary superblock/GDT copy don't resize,           * because the user tools have no way of handling this.  Probably a           * bad time to do it anyways.  | 
