Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 35e478f4 authored by Steven Whitehouse's avatar Steven Whitehouse
Browse files

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: default avatarSteven Whitehouse <swhiteho@redhat.com>
parent 58884c4d
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -1557,6 +1557,7 @@ static void gfs2_evict_inode(struct inode *inode)
	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;