summaryrefslogtreecommitdiffstats
path: root/fs/gfs2/glops.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-01-14 14:37:09 -0800
committerDavid S. Miller <davem@davemloft.net>2014-01-14 14:42:42 -0800
commit0a379e21c503b2ff66b44d588df9f231e9b0b9ca (patch)
tree22b875fcf4b67fcd007726f00c5fc1748ce985d0 /fs/gfs2/glops.c
parenta49da8811e71c5355b52c65ee32976741d5834cd (diff)
parentfdc3452cd2c7b2bfe0f378f92123f4f9a98fa2bd (diff)
downloadlinux-stable-0a379e21c503b2ff66b44d588df9f231e9b0b9ca.tar.gz
linux-stable-0a379e21c503b2ff66b44d588df9f231e9b0b9ca.tar.bz2
linux-stable-0a379e21c503b2ff66b44d588df9f231e9b0b9ca.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'fs/gfs2/glops.c')
-rw-r--r--fs/gfs2/glops.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c
index db908f697139..f88dcd925010 100644
--- a/fs/gfs2/glops.c
+++ b/fs/gfs2/glops.c
@@ -192,8 +192,11 @@ static void inode_go_sync(struct gfs2_glock *gl)
if (ip && !S_ISREG(ip->i_inode.i_mode))
ip = NULL;
- if (ip && test_and_clear_bit(GIF_SW_PAGED, &ip->i_flags))
- unmap_shared_mapping_range(ip->i_inode.i_mapping, 0, 0);
+ if (ip) {
+ if (test_and_clear_bit(GIF_SW_PAGED, &ip->i_flags))
+ unmap_shared_mapping_range(ip->i_inode.i_mapping, 0, 0);
+ inode_dio_wait(&ip->i_inode);
+ }
if (!test_and_clear_bit(GLF_DIRTY, &gl->gl_flags))
return;
@@ -410,6 +413,9 @@ static int inode_go_lock(struct gfs2_holder *gh)
return error;
}
+ if (gh->gh_state != LM_ST_DEFERRED)
+ inode_dio_wait(&ip->i_inode);
+
if ((ip->i_diskflags & GFS2_DIF_TRUNC_IN_PROG) &&
(gl->gl_state == LM_ST_EXCLUSIVE) &&
(gh->gh_state == LM_ST_EXCLUSIVE)) {