From: Marcin Slusarz Date: Fri, 8 Feb 2008 12:20:33 +0000 (-0800) Subject: udf: check if udf_load_logicalvol failed X-Git-Tag: v2.6.25-rc1~147 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=deae6cfcdc206f68e89346295909a2629f0e0606;p=linux-2.6-omap-h63xx.git udf: check if udf_load_logicalvol failed udf_load_logicalvol may fail eg in out of memory conditions - check it and propagate error further Signed-off-by: Marcin Slusarz Cc: Ben Fennema Acked-by: Jan Kara Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/udf/super.c b/fs/udf/super.c index 4d1e197164b..913ece8eec6 100644 --- a/fs/udf/super.c +++ b/fs/udf/super.c @@ -1263,7 +1263,10 @@ static int udf_process_sequence(struct super_block *sb, long block, if (i == VDS_POS_PRIMARY_VOL_DESC) { udf_load_pvoldesc(sb, bh); } else if (i == VDS_POS_LOGICAL_VOL_DESC) { - udf_load_logicalvol(sb, bh, fileset); /* TODO: check return value */ + if (udf_load_logicalvol(sb, bh, fileset)) { + brelse(bh); + return 1; + } } else if (i == VDS_POS_PARTITION_DESC) { struct buffer_head *bh2 = NULL; if (udf_load_partdesc(sb, bh)) {