diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2014-04-03 17:47:08 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-03 19:20:56 -0400 |
commit | 6fdb702d6262b18b1b41a35f1f81903b0a2bc2c9 (patch) | |
tree | fd2dad0ad0c3706f7e511ffd1b47a5af144a0981 /fs/ocfs2/xattr.c | |
parent | f81c20158f8d5f7938d5eb86ecc42ecc09273ce6 (diff) |
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>
Diffstat (limited to 'fs/ocfs2/xattr.c')
-rw-r--r-- | fs/ocfs2/xattr.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c index 4217fedb2c11..14b8c46b4fbb 100644 --- a/fs/ocfs2/xattr.c +++ b/fs/ocfs2/xattr.c | |||
@@ -2602,6 +2602,7 @@ int ocfs2_xattr_remove(struct inode *inode, struct buffer_head *di_bh) | |||
2602 | oi->ip_dyn_features &= ~(OCFS2_INLINE_XATTR_FL | OCFS2_HAS_XATTR_FL); | 2602 | oi->ip_dyn_features &= ~(OCFS2_INLINE_XATTR_FL | OCFS2_HAS_XATTR_FL); |
2603 | di->i_dyn_features = cpu_to_le16(oi->ip_dyn_features); | 2603 | di->i_dyn_features = cpu_to_le16(oi->ip_dyn_features); |
2604 | spin_unlock(&oi->ip_lock); | 2604 | spin_unlock(&oi->ip_lock); |
2605 | ocfs2_update_inode_fsync_trans(handle, inode, 0); | ||
2605 | 2606 | ||
2606 | ocfs2_journal_dirty(handle, di_bh); | 2607 | ocfs2_journal_dirty(handle, di_bh); |
2607 | out_commit: | 2608 | out_commit: |
@@ -3621,6 +3622,7 @@ int ocfs2_xattr_set(struct inode *inode, | |||
3621 | } | 3622 | } |
3622 | 3623 | ||
3623 | ret = __ocfs2_xattr_set_handle(inode, di, &xi, &xis, &xbs, &ctxt); | 3624 | ret = __ocfs2_xattr_set_handle(inode, di, &xi, &xis, &xbs, &ctxt); |
3625 | ocfs2_update_inode_fsync_trans(ctxt.handle, inode, 0); | ||
3624 | 3626 | ||
3625 | ocfs2_commit_trans(osb, ctxt.handle); | 3627 | ocfs2_commit_trans(osb, ctxt.handle); |
3626 | 3628 | ||
@@ -5483,6 +5485,7 @@ static int ocfs2_rm_xattr_cluster(struct inode *inode, | |||
5483 | ret = ocfs2_truncate_log_append(osb, handle, blkno, len); | 5485 | ret = ocfs2_truncate_log_append(osb, handle, blkno, len); |
5484 | if (ret) | 5486 | if (ret) |
5485 | mlog_errno(ret); | 5487 | mlog_errno(ret); |
5488 | ocfs2_update_inode_fsync_trans(handle, inode, 0); | ||
5486 | 5489 | ||
5487 | out_commit: | 5490 | out_commit: |
5488 | ocfs2_commit_trans(osb, handle); | 5491 | ocfs2_commit_trans(osb, handle); |