Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec...
[pandora-kernel.git] / fs / ocfs2 / namei.c
index d14cad6..30c5231 100644 (file)
@@ -1017,8 +1017,11 @@ static int ocfs2_double_lock(struct ocfs2_super *osb,
                 * An error return must mean that no cluster locks
                 * were held on function exit.
                 */
-               if (oi1->ip_blkno != oi2->ip_blkno)
+               if (oi1->ip_blkno != oi2->ip_blkno) {
                        ocfs2_inode_unlock(inode2, 1);
+                       brelse(*bh2);
+                       *bh2 = NULL;
+               }
 
                if (status != -ENOENT)
                        mlog_errno(status);