summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2010-03-12 09:42:15 +1100
committerGreg Kroah-Hartman <gregkh@suse.de>2010-04-26 07:41:16 -0700
commit76962b5ed721dd91bd736c65944522798a35ced5 (patch)
tree6891e5fb19f1eb2f086e2b835c720c957c5028ed /fs
parent83b546b83752bd43cfc26458709d48293956a3c8 (diff)
downloadlinux-stable-76962b5ed721dd91bd736c65944522798a35ced5.tar.gz
linux-stable-76962b5ed721dd91bd736c65944522798a35ced5.tar.bz2
linux-stable-76962b5ed721dd91bd736c65944522798a35ced5.zip
xfs: remove invalid barrier optimization from xfs_fsync
commit e8b217e7530c6a073ac69f1c85b922d93fdf5647 upstream Date: Tue, 2 Feb 2010 10:16:26 +1100 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> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs')
-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 ae2e44fafd72..38a63244e75d 100644
--- a/fs/xfs/xfs_vnodeops.c
+++ b/fs/xfs/xfs_vnodeops.c
@@ -597,7 +597,7 @@ xfs_fsync(
{
xfs_trans_t *tp;
int error = 0;
- int log_flushed = 0, changed = 1;
+ int log_flushed = 0;
xfs_itrace_entry(ip);
@@ -627,19 +627,11 @@ xfs_fsync(
* disk yet, the inode will be still be pinned. If it is,
* force the log.
*/
-
xfs_iunlock(ip, XFS_ILOCK_SHARED);
-
if (xfs_ipincount(ip)) {
error = _xfs_log_force(ip->i_mount, (xfs_lsn_t)0,
XFS_LOG_FORCE | XFS_LOG_SYNC,
&log_flushed);
- } else {
- /*
- * If the inode is not pinned and nothing has changed
- * we don't need to flush the cache.
- */
- changed = 0;
}
} else {
/*
@@ -674,7 +666,7 @@ xfs_fsync(
xfs_iunlock(ip, XFS_ILOCK_EXCL);
}
- if ((ip->i_mount->m_flags & XFS_MOUNT_BARRIER) && changed) {
+ if (ip->i_mount->m_flags & XFS_MOUNT_BARRIER) {
/*
* If the log write didn't issue an ordered tag we need
* to flush the disk cache for the data device now.