Skip to content

Commit

Permalink
udf: check if udf_load_logicalvol failed
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Marcin Slusarz authored and Linus Torvalds committed Feb 8, 2008
1 parent dc5d39b commit deae6cf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion fs/udf/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit deae6cf

Please sign in to comment.