aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_vnodeops.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2010-02-01 18:16:26 -0500
committerDave Chinner <david@fromorbit.com>2010-02-01 18:16:26 -0500
commite8b217e7530c6a073ac69f1c85b922d93fdf5647 (patch)
tree09d9ce38d3baa747190c16eaffd39462259179ae /fs/xfs/xfs_vnodeops.c
parent20026d92013d7bb3abb295337191def6758fc086 (diff)
xfs: remove invalid barrier optimization from xfs_fsync
We always need to flush the disk write cache and can't skip it just because the no inode attributes have changed. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_vnodeops.c')
-rw-r--r--fs/xfs/xfs_vnodeops.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c
index fd108b738559..43241e289800 100644
--- a/fs/xfs/xfs_vnodeops.c
+++ b/fs/xfs/xfs_vnodeops.c
@@ -597,7 +597,7 @@ xfs_fsync(
597{ 597{
598 xfs_trans_t *tp; 598 xfs_trans_t *tp;
599 int error = 0; 599 int error = 0;
600 int log_flushed = 0, changed = 1; 600 int log_flushed = 0;
601 601
602 xfs_itrace_entry(ip); 602 xfs_itrace_entry(ip);
603 603
@@ -627,18 +627,10 @@ xfs_fsync(
627 * disk yet, the inode will be still be pinned. If it is, 627 * disk yet, the inode will be still be pinned. If it is,
628 * force the log. 628 * force the log.
629 */ 629 */
630
631 xfs_iunlock(ip, XFS_ILOCK_SHARED); 630 xfs_iunlock(ip, XFS_ILOCK_SHARED);
632
633 if (xfs_ipincount(ip)) { 631 if (xfs_ipincount(ip)) {
634 error = _xfs_log_force(ip->i_mount, XFS_LOG_SYNC, 632 error = _xfs_log_force(ip->i_mount, XFS_LOG_SYNC,
635 &log_flushed); 633 &log_flushed);
636 } else {
637 /*
638 * If the inode is not pinned and nothing has changed
639 * we don't need to flush the cache.
640 */
641 changed = 0;
642 } 634 }
643 } else { 635 } else {
644 /* 636 /*
@@ -673,7 +665,7 @@ xfs_fsync(
673 xfs_iunlock(ip, XFS_ILOCK_EXCL); 665 xfs_iunlock(ip, XFS_ILOCK_EXCL);
674 } 666 }
675 667
676 if ((ip->i_mount->m_flags & XFS_MOUNT_BARRIER) && changed) { 668 if (ip->i_mount->m_flags & XFS_MOUNT_BARRIER) {
677 /* 669 /*
678 * If the log write didn't issue an ordered tag we need 670 * If the log write didn't issue an ordered tag we need
679 * to flush the disk cache for the data device now. 671 * to flush the disk cache for the data device now.