ocfs2: call ocfs2_update_inode_fsync_trans when updating any inode
Ensure that ocfs2_update_inode_fsync_trans() is called any time we touch an inode in a given transaction. This is a follow-on to the previous patch to reduce lock contention and deadlocking during an fsync operation. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Cc: Mark Fasheh <mfasheh@suse.de> Cc: Joel Becker <jlbec@evilplan.org> Cc: Wengang <wen.gang.wang@oracle.com> Cc: Greg Marsden <greg.marsden@oracle.com> Cc: Srinivas Eeda <srinivas.eeda@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:

committed by
Linus Torvalds

parent
f81c20158f
commit
6fdb702d62
@@ -2602,6 +2602,7 @@ int ocfs2_xattr_remove(struct inode *inode, struct buffer_head *di_bh)
|
||||
oi->ip_dyn_features &= ~(OCFS2_INLINE_XATTR_FL | OCFS2_HAS_XATTR_FL);
|
||||
di->i_dyn_features = cpu_to_le16(oi->ip_dyn_features);
|
||||
spin_unlock(&oi->ip_lock);
|
||||
ocfs2_update_inode_fsync_trans(handle, inode, 0);
|
||||
|
||||
ocfs2_journal_dirty(handle, di_bh);
|
||||
out_commit:
|
||||
@@ -3621,6 +3622,7 @@ int ocfs2_xattr_set(struct inode *inode,
|
||||
}
|
||||
|
||||
ret = __ocfs2_xattr_set_handle(inode, di, &xi, &xis, &xbs, &ctxt);
|
||||
ocfs2_update_inode_fsync_trans(ctxt.handle, inode, 0);
|
||||
|
||||
ocfs2_commit_trans(osb, ctxt.handle);
|
||||
|
||||
@@ -5483,6 +5485,7 @@ static int ocfs2_rm_xattr_cluster(struct inode *inode,
|
||||
ret = ocfs2_truncate_log_append(osb, handle, blkno, len);
|
||||
if (ret)
|
||||
mlog_errno(ret);
|
||||
ocfs2_update_inode_fsync_trans(handle, inode, 0);
|
||||
|
||||
out_commit:
|
||||
ocfs2_commit_trans(osb, handle);
|
||||
|
Reference in New Issue
Block a user