From 8415a16b2b0fbebcfaef0f35397b0364a8b8cb37 Mon Sep 17 00:00:00 2001 From: Tao Ma Date: Tue, 7 Sep 2010 13:30:06 +0800 Subject: [PATCH] --- yaml --- r: 210968 b: refs/heads/master c: 07eaac9438b13ec0b863111698b91ccec8f3b8d4 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/ocfs2/dlmglue.h | 1 + trunk/fs/ocfs2/refcounttree.c | 5 +++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 57ff34ee2667..61b53577902c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5e64b0d9e86ffff8b299556341d85319117539e9 +refs/heads/master: 07eaac9438b13ec0b863111698b91ccec8f3b8d4 diff --git a/trunk/fs/ocfs2/dlmglue.h b/trunk/fs/ocfs2/dlmglue.h index d1ce48e1b3d6..1d596d8c4a4a 100644 --- a/trunk/fs/ocfs2/dlmglue.h +++ b/trunk/fs/ocfs2/dlmglue.h @@ -84,6 +84,7 @@ enum { OI_LS_PARENT, OI_LS_RENAME1, OI_LS_RENAME2, + OI_LS_REFLINK_TARGET, }; int ocfs2_dlm_init(struct ocfs2_super *osb); diff --git a/trunk/fs/ocfs2/refcounttree.c b/trunk/fs/ocfs2/refcounttree.c index 0afeda83120f..efdd75607406 100644 --- a/trunk/fs/ocfs2/refcounttree.c +++ b/trunk/fs/ocfs2/refcounttree.c @@ -4201,8 +4201,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;