aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2')
-rw-r--r--fs/gfs2/file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c
index 6e600abf694a..15c44cf457cc 100644
--- a/fs/gfs2/file.c
+++ b/fs/gfs2/file.c
@@ -655,7 +655,7 @@ static int gfs2_fsync(struct file *file, loff_t start, loff_t end,
655{ 655{
656 struct address_space *mapping = file->f_mapping; 656 struct address_space *mapping = file->f_mapping;
657 struct inode *inode = mapping->host; 657 struct inode *inode = mapping->host;
658 int sync_state = inode->i_state & I_DIRTY; 658 int sync_state = inode->i_state & I_DIRTY_ALL;
659 struct gfs2_inode *ip = GFS2_I(inode); 659 struct gfs2_inode *ip = GFS2_I(inode);
660 int ret = 0, ret1 = 0; 660 int ret = 0, ret1 = 0;
661 661
@@ -668,7 +668,7 @@ static int gfs2_fsync(struct file *file, loff_t start, loff_t end,
668 if (!gfs2_is_jdata(ip)) 668 if (!gfs2_is_jdata(ip))
669 sync_state &= ~I_DIRTY_PAGES; 669 sync_state &= ~I_DIRTY_PAGES;
670 if (datasync) 670 if (datasync)
671 sync_state &= ~I_DIRTY_SYNC; 671 sync_state &= ~(I_DIRTY_SYNC | I_DIRTY_TIME);
672 672
673 if (sync_state) { 673 if (sync_state) {
674 ret = sync_inode_metadata(inode, 1); 674 ret = sync_inode_metadata(inode, 1);