提交 28f7c4d4 编写于 作者: M Marcin Slusarz 提交者: Linus Torvalds

udf: improve readability of udf_load_partition

Signed-off-by: NMarcin Slusarz <marcin.slusarz@gmail.com>
Acked-by: NJan Kara <jack@suse.cz>
Cc: Christoph Hellwig <hch@infradead.org>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 756fa92f
...@@ -1447,16 +1447,18 @@ static int udf_load_partition(struct super_block *sb, kernel_lb_addr *fileset) ...@@ -1447,16 +1447,18 @@ static int udf_load_partition(struct super_block *sb, kernel_lb_addr *fileset)
sbi = UDF_SB(sb); sbi = UDF_SB(sb);
for (i = 0; i < ARRAY_SIZE(sbi->s_anchor); i++) { for (i = 0; i < ARRAY_SIZE(sbi->s_anchor); i++) {
if (sbi->s_anchor[i] && if (!sbi->s_anchor[i])
(bh = udf_read_tagged(sb, sbi->s_anchor[i], continue;
sbi->s_anchor[i], &ident))) { bh = udf_read_tagged(sb, sbi->s_anchor[i], sbi->s_anchor[i],
&ident);
if (!bh)
continue;
anchor = (struct anchorVolDescPtr *)bh->b_data; anchor = (struct anchorVolDescPtr *)bh->b_data;
/* Locate the main sequence */ /* Locate the main sequence */
main_s = le32_to_cpu( main_s = le32_to_cpu(anchor->mainVolDescSeqExt.extLocation);
anchor->mainVolDescSeqExt.extLocation); main_e = le32_to_cpu(anchor->mainVolDescSeqExt.extLength);
main_e = le32_to_cpu(
anchor->mainVolDescSeqExt.extLength);
main_e = main_e >> sb->s_blocksize_bits; main_e = main_e >> sb->s_blocksize_bits;
main_e += main_s; main_e += main_s;
...@@ -1478,12 +1480,11 @@ static int udf_load_partition(struct super_block *sb, kernel_lb_addr *fileset) ...@@ -1478,12 +1480,11 @@ static int udf_load_partition(struct super_block *sb, kernel_lb_addr *fileset)
fileset))) fileset)))
break; break;
} }
}
if (i == ARRAY_SIZE(sbi->s_anchor)) { if (i == ARRAY_SIZE(sbi->s_anchor)) {
udf_debug("No Anchor block found\n"); udf_debug("No Anchor block found\n");
return 1; return 1;
} else }
udf_debug("Using anchor in block %d\n", sbi->s_anchor[i]); udf_debug("Using anchor in block %d\n", sbi->s_anchor[i]);
for (i = 0; i < sbi->s_partitions; i++) { for (i = 0; i < sbi->s_partitions; i++) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册