From: Tao Ma Date: Mon, 20 Dec 2010 08:21:11 +0000 (+0800) Subject: ocfs2: Release buffer_head in case of error in ocfs2_double_lock. X-Git-Tag: v2.6.38-rc1~413^2~13 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e6d9153df27923649976554d034a69ac7b28f95;p=pandora-kernel.git ocfs2: Release buffer_head in case of error in ocfs2_double_lock. In ocfs2_double_lock, when ocfs2_inode_lock for inode1 fails, we just unlock inode2 and return without releasing buffer we get from inode_lock(inode2). The good thing is that it is freed by the only caller ocfs2_rename when it exits. But I don't think this is a right way for error handling. We should free the buffer_head we get in ocfs2_double_lock before exit so that the caller doesn't need to take care of it. Signed-off-by: Tao Ma Signed-off-by: Joel Becker --- Reading git-diff-tree failed