Merge branch 'globalheartbeat-2' of git://oss.oracle.com/git/smushran/linux-2.6 into...
[pandora-kernel.git] / fs / ocfs2 / refcounttree.c
index a120cfc..b5f9160 100644 (file)
@@ -4240,8 +4240,9 @@ static int __ocfs2_reflink(struct dentry *old_dentry,
                goto out;
        }
 
-       mutex_lock(&new_inode->i_mutex);
-       ret = ocfs2_inode_lock(new_inode, &new_bh, 1);
+       mutex_lock_nested(&new_inode->i_mutex, I_MUTEX_CHILD);
+       ret = ocfs2_inode_lock_nested(new_inode, &new_bh, 1,
+                                     OI_LS_REFLINK_TARGET);
        if (ret) {
                mlog_errno(ret);
                goto out_unlock;