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 <marcin.slusarz@gmail.com>
Cc: Ben Fennema <bfennema@falcon.csc.calpoly.edu>
Acked-by: Jan Kara <jack@suse.cz>
Cc: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Marcin Slusarz 2008-02-08 04:20:33 -08:00 committed by Linus Torvalds
parent dc5d39be6d
commit deae6cfcdc
1 changed files with 4 additions and 1 deletions

View File

@ -1263,7 +1263,10 @@ static int udf_process_sequence(struct super_block *sb, long block,
if (i == VDS_POS_PRIMARY_VOL_DESC) { if (i == VDS_POS_PRIMARY_VOL_DESC) {
udf_load_pvoldesc(sb, bh); udf_load_pvoldesc(sb, bh);
} else if (i == VDS_POS_LOGICAL_VOL_DESC) { } 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) { } else if (i == VDS_POS_PARTITION_DESC) {
struct buffer_head *bh2 = NULL; struct buffer_head *bh2 = NULL;
if (udf_load_partdesc(sb, bh)) { if (udf_load_partdesc(sb, bh)) {