[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:
parent
304c4c841a
commit
e6022603b9
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user