mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-09 14:43:16 +00:00
udf: simplify __udf_read_inode
- move all brelse(ibh) after main if, because it's called on every path except one where ibh is null - move variables to the most inner blocks Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz>
This commit is contained in:
parent
c2104fda5e
commit
1ab9278570
@ -1101,16 +1101,16 @@ static void __udf_read_inode(struct inode *inode)
|
||||
fe = (struct fileEntry *)bh->b_data;
|
||||
|
||||
if (fe->icbTag.strategyType == cpu_to_le16(4096)) {
|
||||
struct buffer_head *ibh = NULL, *nbh = NULL;
|
||||
struct indirectEntry *ie;
|
||||
struct buffer_head *ibh;
|
||||
|
||||
ibh = udf_read_ptagged(inode->i_sb, iinfo->i_location, 1,
|
||||
&ident);
|
||||
if (ident == TAG_IDENT_IE) {
|
||||
if (ibh) {
|
||||
if (ident == TAG_IDENT_IE && ibh) {
|
||||
struct buffer_head *nbh = NULL;
|
||||
kernel_lb_addr loc;
|
||||
ie = (struct indirectEntry *)ibh->b_data;
|
||||
struct indirectEntry *ie;
|
||||
|
||||
ie = (struct indirectEntry *)ibh->b_data;
|
||||
loc = lelb_to_cpu(ie->indirectICB.extLocation);
|
||||
|
||||
if (ie->indirectICB.extLength &&
|
||||
@ -1126,17 +1126,11 @@ static void __udf_read_inode(struct inode *inode)
|
||||
brelse(nbh);
|
||||
__udf_read_inode(inode);
|
||||
return;
|
||||
} else {
|
||||
}
|
||||
brelse(nbh);
|
||||
}
|
||||
}
|
||||
brelse(ibh);
|
||||
}
|
||||
} else {
|
||||
brelse(ibh);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
brelse(ibh);
|
||||
}
|
||||
} else if (fe->icbTag.strategyType != cpu_to_le16(4)) {
|
||||
printk(KERN_ERR "udf: unsupported strategy type: %d\n",
|
||||
le16_to_cpu(fe->icbTag.strategyType));
|
||||
|
Loading…
x
Reference in New Issue
Block a user