* Re: [PATCH v2] ext4: add checks of block references for non-extent inodes
[not found] ` <49C3A51C.1030201@ph.tum.de>
@ 2009-03-31 8:41 ` Thiemo Nagel
2009-03-31 12:37 ` Theodore Tso
0 siblings, 1 reply; 2+ messages in thread
From: Thiemo Nagel @ 2009-03-31 8:41 UTC (permalink / raw)
To: Theodore Ts'o, Aneesh Kumar K.V, sfr; +Cc: Ext4 Developers List, linux-next
[-- Attachment #1: Type: text/plain, Size: 262 bytes --]
Dear Ted, Aneesh, Stephen,
thanks a lot for your comments and fixes! The attached patch (applied
on-top) should fix the
* buffer head leak spotted by Aneesh
* warning reported by Stephen
Kind regards,
Signed-off-by: Thiemo Nagel <thiemo.nagel@ph.tum.de>
[-- Attachment #2: fixup-blockref-checks.patch --]
[-- Type: text/x-patch, Size: 894 bytes --]
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 9ab845e..69715e5 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -380,9 +380,9 @@ static int __ext4_check_blockref(const char *function, struct inode *inode,
if (unlikely(*bref >= maxblocks)) {
ext4_error(inode->i_sb, function,
"block reference %u >= max (%u) "
- "in inode #%lu, offset=%u",
+ "in inode #%lu, offset=%i",
*bref, maxblocks,
- inode->i_ino, bref-p);
+ inode->i_ino, (int)(bref-p));
return -EIO;
}
bref++;
@@ -453,8 +453,10 @@ static Indirect *ext4_get_branch(struct inode *inode, int depth,
goto failure;
}
/* validate block references */
- if (ext4_check_indirect_blockref(inode, bh))
+ if (ext4_check_indirect_blockref(inode, bh)) {
+ put_bh(bh);
goto failure;
+ }
}
add_chain(++p, bh, (__le32 *)bh->b_data + *++offsets);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] ext4: add checks of block references for non-extent inodes
2009-03-31 8:41 ` [PATCH v2] ext4: add checks of block references for non-extent inodes Thiemo Nagel
@ 2009-03-31 12:37 ` Theodore Tso
0 siblings, 0 replies; 2+ messages in thread
From: Theodore Tso @ 2009-03-31 12:37 UTC (permalink / raw)
To: Thiemo Nagel; +Cc: Aneesh Kumar K.V, sfr, Ext4 Developers List, linux-next
On Tue, Mar 31, 2009 at 10:41:27AM +0200, Thiemo Nagel wrote:
> Dear Ted, Aneesh, Stephen,
>
> thanks a lot for your comments and fixes! The attached patch (applied
> on-top) should fix the
> * buffer head leak spotted by Aneesh
> * warning reported by Stephen
>
> Kind regards,
Thanks, I've merged this into your patch in the ext4 patch queue.
- Ted
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-03-31 12:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <49B94396.2020800@ph.tum.de>
[not found] ` <49C3A51C.1030201@ph.tum.de>
2009-03-31 8:41 ` [PATCH v2] ext4: add checks of block references for non-extent inodes Thiemo Nagel
2009-03-31 12:37 ` Theodore Tso
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).