summaryrefslogtreecommitdiffstats
path: root/fs/gfs2/inode.h
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2006-04-28 10:46:21 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2006-04-28 10:46:21 -0400
commit363275216c1a1b0b82c8419310c194b8c26b9c27 (patch)
tree476bb04ff32ac1724afa192f4950f4a39a0237f2 /fs/gfs2/inode.h
parentd26046bb0aff707aac38a9bf3dd56fa39b28a399 (diff)
downloadop-kernel-dev-363275216c1a1b0b82c8419310c194b8c26b9c27.zip
op-kernel-dev-363275216c1a1b0b82c8419310c194b8c26b9c27.tar.gz
[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 <rkenna@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/inode.h')
-rw-r--r--fs/gfs2/inode.h2
1 files changed, 1 insertions, 1 deletions
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);
OpenPOWER on IntegriCloud