[PATCH] ext3: Wrong return value for EXT3_IOC_GROUP_ADD

This patch corrects the return value for the EXT3_IOC_GROUP_ADD in case it
fails due to the presence of multiple resizers at the filesystem.

The problem is a little bit more serious than a wrong return value in this
case, since the clause err=0 in the exit_journal path will lead to a call
to update_backups which in turns causes a NULL pointer dereference.

Signed-off-by: Glauber de Oliveira Costa <glommer@br.ibm.com>
Cc: "Stephen C. Tweedie" <sct@redhat.com>
Cc: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Glauber de Oliveira Costa and committed by
Linus Torvalds
aa877b3d ad09d583

+1
+1
fs/ext3/resize.c
··· 767 767 if (input->group != EXT3_SB(sb)->s_groups_count) { 768 768 ext3_warning(sb, __FUNCTION__, 769 769 "multiple resizers run on filesystem!\n"); 770 + err = -EBUSY; 770 771 goto exit_journal; 771 772 } 772 773