Browse Source

GFS2: Flush pending glock work when evicting an inode

This ensures that we will not try to access the inode thats
being flushed via the glock after it has been freed.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Steven Whitehouse 13 years ago
parent
commit
35e478f422
1 changed files with 1 additions and 0 deletions
  1. 1 0
      fs/gfs2/super.c

+ 1 - 0
fs/gfs2/super.c

@@ -1557,6 +1557,7 @@ out:
 	end_writeback(inode);
 	end_writeback(inode);
 	gfs2_dir_hash_inval(ip);
 	gfs2_dir_hash_inval(ip);
 	ip->i_gl->gl_object = NULL;
 	ip->i_gl->gl_object = NULL;
+	flush_delayed_work_sync(&ip->i_gl->gl_work);
 	gfs2_glock_add_to_lru(ip->i_gl);
 	gfs2_glock_add_to_lru(ip->i_gl);
 	gfs2_glock_put(ip->i_gl);
 	gfs2_glock_put(ip->i_gl);
 	ip->i_gl = NULL;
 	ip->i_gl = NULL;