aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikola Pajkovsky <npajkovs@redhat.com>2012-08-15 00:38:08 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-10-21 09:17:12 -0700
commitb08d7dbc33f4821d23de1ec921146aca004f46ee (patch)
tree370f492abb661d97efe0678794d9d6a80951188c
parent39a088528efe15ad3e1309b710d27fa9e3739aef (diff)
downloadkernel_samsung_espresso10-b08d7dbc33f4821d23de1ec921146aca004f46ee.zip
kernel_samsung_espresso10-b08d7dbc33f4821d23de1ec921146aca004f46ee.tar.gz
kernel_samsung_espresso10-b08d7dbc33f4821d23de1ec921146aca004f46ee.tar.bz2
udf: fix retun value on error path in udf_load_logicalvol
commit 68766a2edcd5cd744262a70a2f67a320ac944760 upstream. In case we detect a problem and bail out, we fail to set "ret" to a nonzero value, and udf_load_logicalvol will mistakenly report success. Signed-off-by: Nikola Pajkovsky <npajkovs@redhat.com> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-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 a8e867a..b0c7b53 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -1316,6 +1316,7 @@ static int udf_load_logicalvol(struct super_block *sb, sector_t block,
udf_error(sb, __func__, "error loading logical volume descriptor: "
"Partition table too long (%u > %lu)\n", table_len,
sb->s_blocksize - sizeof(*lvd));
+ ret = 1;
goto out_bh;
}
@@ -1360,8 +1361,10 @@ static int udf_load_logicalvol(struct super_block *sb, sector_t block,
UDF_ID_SPARABLE,
strlen(UDF_ID_SPARABLE))) {
if (udf_load_sparable_map(sb, map,
- (struct sparablePartitionMap *)gpm) < 0)
+ (struct sparablePartitionMap *)gpm) < 0) {
+ ret = 1;
goto out_bh;
+ }
} else if (!strncmp(upm2->partIdent.ident,
UDF_ID_METADATA,
strlen(UDF_ID_METADATA))) {