]> git.baikalelectronics.ru Git - kernel.git/commit
ocfs2: fix inode leak
authorMark Fasheh <mark.fasheh@oracle.com>
Thu, 10 May 2007 00:34:26 +0000 (17:34 -0700)
committerMark Fasheh <mark.fasheh@oracle.com>
Fri, 25 May 2007 18:00:46 +0000 (11:00 -0700)
commitbb96db0c413ffcff44f8741469f31b42f5f944d3
treec36ea2c8b9de97102397a755bf10cb3997461071
parent03095edf828eec978f7aa8f7f67c0e5e24dd4abd
ocfs2: fix inode leak

We weren't cleaning up our inode reference on error in
ocfs2_reserve_local_alloc_bits(). Add a check for error return and iput() if
need be. Move the code to set the alloc context inode info to the end of the
function so we don't have any possibility of passing back a bad pointer.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
fs/ocfs2/localalloc.c