summaryrefslogtreecommitdiffstats
path: root/fs/udf/super.c
diff options
context:
space:
mode:
authorMarcin Slusarz <marcin.slusarz@gmail.com>2008-02-08 13:20:33 +0100
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-08 18:22:35 +0100
commitdeae6cfcdc206f68e89346295909a2629f0e0606 (patch)
tree0977ed754a1f1be8802e6f5541208ea0fe4b39fa /fs/udf/super.c
parentudf: convert UDF_SB_ALLOC_PARTMAPS macro to udf_sb_alloc_partition_maps function (diff)
downloadlinux-deae6cfcdc206f68e89346295909a2629f0e0606.tar.xz
linux-deae6cfcdc206f68e89346295909a2629f0e0606.zip
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>
Diffstat (limited to '')
-rw-r--r--fs/udf/super.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/udf/super.c b/fs/udf/super.c
index 4d1e197164b7..913ece8eec61 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)) {