aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/file.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-09-09 12:16:51 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-09-09 12:16:51 -0400
commit6c337ad6cccf3365c89152896217be9d953121c6 (patch)
tree9f679575b0025c9b279d733f77982cc4cb74b8ed /fs/gfs2/file.c
parent6cccc7d3012344371a897ecdd1a1398286a6ee8a (diff)
parent0c9018097fe2966d80fe39e5c9ca94bb436ec369 (diff)
Merge tag 'gfs2-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-3.0-nmw
Pull GFS2 updates from Steven Whitehouse: "This is possibly the smallest ever set of GFS2 patches for a merge window. Also, most of them are bug fixes this time. Two of my three patches (moving gfs2_sync_meta and merging the two writepage implementations) are clean ups with the third (taking the glock ref in examine_bucket) being a fix for a difficult to hit race condition. The removal of an unused memory barrier is a clean up from Bob Peterson, and the "spectator" relates to a rarely used mount option. Ben Marzinski's patch fixes a corner case where the incorrect inode flags were being set, resulting in incorrect behaviour on fsync" * tag 'gfs2-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-3.0-nmw: GFS2: dirty inode correctly in gfs2_write_end GFS2: Don't flag consistency error if first mounter is a spectator GFS2: Remove unnecessary memory barrier GFS2: Merge ordered and writeback writepage GFS2: Take glock reference in examine_bucket() GFS2: Move gfs2_sync_meta to lops.c
Diffstat (limited to 'fs/gfs2/file.c')
-rw-r--r--fs/gfs2/file.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c
index 72c3866a7320..0621b46d474d 100644
--- a/fs/gfs2/file.c
+++ b/fs/gfs2/file.c
@@ -650,7 +650,7 @@ static int gfs2_fsync(struct file *file, loff_t start, loff_t end,
650{ 650{
651 struct address_space *mapping = file->f_mapping; 651 struct address_space *mapping = file->f_mapping;
652 struct inode *inode = mapping->host; 652 struct inode *inode = mapping->host;
653 int sync_state = inode->i_state & (I_DIRTY_SYNC|I_DIRTY_DATASYNC); 653 int sync_state = inode->i_state & I_DIRTY;
654 struct gfs2_inode *ip = GFS2_I(inode); 654 struct gfs2_inode *ip = GFS2_I(inode);
655 int ret = 0, ret1 = 0; 655 int ret = 0, ret1 = 0;
656 656
@@ -660,6 +660,8 @@ static int gfs2_fsync(struct file *file, loff_t start, loff_t end,
660 return ret1; 660 return ret1;
661 } 661 }
662 662
663 if (!gfs2_is_jdata(ip))
664 sync_state &= ~I_DIRTY_PAGES;
663 if (datasync) 665 if (datasync)
664 sync_state &= ~I_DIRTY_SYNC; 666 sync_state &= ~I_DIRTY_SYNC;
665 667