diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c
index 104093f8270455fe729ecf735a3c43fde4dfe320..bc870561e3942f458f519a9fad73e25e2a01f147 100644
--- a/fs/ext4/resize.c
+++ b/fs/ext4/resize.c
@@ -1973,6 +1973,16 @@ int ext4_resize_fs(struct super_block *sb, ext4_fsblk_t n_blocks_count)
 	}
 	brelse(bh);
 
+	/*
+	 * For bigalloc, trim the requested size to the nearest cluster
+	 * boundary to avoid creating an unusable filesystem. We do this
+	 * silently, instead of returning an error, to avoid breaking
+	 * callers that blindly resize the filesystem to the full size of
+	 * the underlying block device.
+	 */
+	if (ext4_has_feature_bigalloc(sb))
+		n_blocks_count &= ~((1 << EXT4_CLUSTER_BITS(sb)) - 1);
+
 retry:
 	o_blocks_count = ext4_blocks_count(es);