提交 e4a10a36 编写于 作者: K Kirill Korotaev 提交者: Linus Torvalds

ext3: lost brelse in ext3_read_inode()

One of error path in ext3_read_inode() leaks bh since brelse is forgoten.
Signed-off-by: NKirill Korotaev <dev@openvz.org>
Acked-by: NVasily Averin <vvs@sw.ru>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 7b018b28
......@@ -2677,8 +2677,10 @@ void ext3_read_inode(struct inode * inode)
*/
ei->i_extra_isize = le16_to_cpu(raw_inode->i_extra_isize);
if (EXT3_GOOD_OLD_INODE_SIZE + ei->i_extra_isize >
EXT3_INODE_SIZE(inode->i_sb))
EXT3_INODE_SIZE(inode->i_sb)) {
brelse (bh);
goto bad_inode;
}
if (ei->i_extra_isize == 0) {
/* The extra space is currently unused. Use it. */
ei->i_extra_isize = sizeof(struct ext3_inode) -
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册