aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2
diff options
context:
space:
mode:
authorBenjamin Marzinski <bmarzins@redhat.com>2012-09-20 10:52:58 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2012-09-24 05:47:30 -0400
commit2216db70c95a9610f5279b8da53bec614d98270f (patch)
tree9cfa0e4e5f6a3d16f503f08321ba776be8695221 /fs/gfs2
parenta0b4df294387c777c3091a43e9970572e10261b1 (diff)
GFS2: Write out dirty inode metadata in delayed deletes
If a dirty GFS2 inode was being deleted but was in use by another node, its metadata was not getting written out before GFS2 checked for dirty buffers in gfs2_ail_flush(). GFS2 was relying on inode_go_sync() to write out the metadata when the other node tried to free the file, but it failed the error check before it got that far. This patch writes out the metadata before calling gfs2_ail_flush() Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2')
-rw-r--r--fs/gfs2/super.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c
index 79cac7057691..a8d90f2f576c 100644
--- a/fs/gfs2/super.c
+++ b/fs/gfs2/super.c
@@ -1545,6 +1545,11 @@ static void gfs2_evict_inode(struct inode *inode)
1545 1545
1546out_truncate: 1546out_truncate:
1547 gfs2_log_flush(sdp, ip->i_gl); 1547 gfs2_log_flush(sdp, ip->i_gl);
1548 if (test_bit(GLF_DIRTY, &ip->i_gl->gl_flags)) {
1549 struct address_space *metamapping = gfs2_glock2aspace(ip->i_gl);
1550 filemap_fdatawrite(metamapping);
1551 filemap_fdatawait(metamapping);
1552 }
1548 write_inode_now(inode, 1); 1553 write_inode_now(inode, 1);
1549 gfs2_ail_flush(ip->i_gl, 0); 1554 gfs2_ail_flush(ip->i_gl, 0);
1550 1555