From 363275216c1a1b0b82c8419310c194b8c26b9c27 Mon Sep 17 00:00:00 2001 From: Steven Whitehouse Date: Fri, 28 Apr 2006 10:46:21 -0400 Subject: [GFS2] Reordering in deallocation to avoid recursive locking Despite my earlier careful search, there was a recursive lock left in the deallocation code. This removes it. It also should speed up deallocation be reducing the number of locking operations which take place by using two "try lock" operations on the two locks involved in inode deallocation which allows us to grab the locks out of order (compared with NFS which grabs the inode lock first and the iopen lock later). It is ok for us to fail while doing this since if it does fail it means that someone else is still using the inode and thus it wouldn't be possible to deallocate anyway. This fixes the bug reported to me by Rob Kenna. Cc: Rob Kenna Signed-off-by: Steven Whitehouse --- fs/gfs2/inode.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/gfs2/inode.h') diff --git a/fs/gfs2/inode.h b/fs/gfs2/inode.h index 0dd2a26..13bc4ea 100644 --- a/fs/gfs2/inode.h +++ b/fs/gfs2/inode.h @@ -39,7 +39,7 @@ int gfs2_inode_get(struct gfs2_glock *i_gl, struct gfs2_inode **ipp); void gfs2_inode_hold(struct gfs2_inode *ip); void gfs2_inode_put(struct gfs2_inode *ip); -void gfs2_inode_destroy(struct gfs2_inode *ip); +void gfs2_inode_destroy(struct gfs2_inode *ip, int unlock); int gfs2_inode_dealloc(struct gfs2_sbd *sdp, struct gfs2_unlinked *ul); -- cgit v1.1