summaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/refcounttree.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-08-04 11:11:22 +0200
committerTakashi Iwai <tiwai@suse.de>2014-08-04 11:11:22 +0200
commit2e65b8916cce4436df29812610d2c2fecdb42b5a (patch)
treefdcae670bd651c8e772eb7cd60420eba5d26a0db /fs/ocfs2/refcounttree.c
parentALSA: hda - fix an external mic jack problem on a HP machine (diff)
parentALSA: hda - add mic mute led hook for dell machines (diff)
downloadlinux-2e65b8916cce4436df29812610d2c2fecdb42b5a.tar.xz
linux-2e65b8916cce4436df29812610d2c2fecdb42b5a.zip
Merge branch 'for-next' into for-linus
Diffstat (limited to 'fs/ocfs2/refcounttree.c')
-rw-r--r--fs/ocfs2/refcounttree.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c
index 714e53b9cc66..636aab69ead5 100644
--- a/fs/ocfs2/refcounttree.c
+++ b/fs/ocfs2/refcounttree.c
@@ -4288,9 +4288,16 @@ static int ocfs2_reflink(struct dentry *old_dentry, struct inode *dir,
goto out;
}
+ error = ocfs2_rw_lock(inode, 1);
+ if (error) {
+ mlog_errno(error);
+ goto out;
+ }
+
error = ocfs2_inode_lock(inode, &old_bh, 1);
if (error) {
mlog_errno(error);
+ ocfs2_rw_unlock(inode, 1);
goto out;
}
@@ -4302,6 +4309,7 @@ static int ocfs2_reflink(struct dentry *old_dentry, struct inode *dir,
up_write(&OCFS2_I(inode)->ip_xattr_sem);
ocfs2_inode_unlock(inode, 1);
+ ocfs2_rw_unlock(inode, 1);
brelse(old_bh);
if (error) {