Skip to content

Commit

Permalink
GFS2: Flush pending glock work when evicting an inode
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Steven Whitehouse committed Mar 7, 2012
1 parent 58884c4 commit 35e478f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/gfs2/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -1557,6 +1557,7 @@ static void gfs2_evict_inode(struct inode *inode)
end_writeback(inode);
gfs2_dir_hash_inval(ip);
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_put(ip->i_gl);
ip->i_gl = NULL;
Expand Down

0 comments on commit 35e478f

Please sign in to comment.