[PATCH] ext3_clear_inode(): avoid kfree(NULL)

Steven Rostedt <rostedt@goodmis.org> points out that `rsv' here is usually
NULL, so we should avoid calling kfree().

Also, fix up some nearby whitespace damage.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Andrew Morton 2006-06-23 02:05:32 -07:00 committed by Linus Torvalds
parent 304c4c841a
commit e6022603b9

View File

@ -512,6 +512,7 @@ static void ext3_clear_inode(struct inode *inode)
#endif
ext3_discard_reservation(inode);
EXT3_I(inode)->i_block_alloc_info = NULL;
if (unlikely(rsv))
kfree(rsv);
}