]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[GFS2] Fix unlink deadlocks
authorRussell Cattelan <cattelan@redhat.com>
Mon, 29 Jan 2007 23:13:44 +0000 (17:13 -0600)
committerSteven Whitehouse <swhiteho@redhat.com>
Mon, 5 Feb 2007 18:38:17 +0000 (13:38 -0500)
commitddee76089cc9bcbd8ae9ec6c26e726a8ab2fe675
treecf08d003789a2be0f109d3d5f255137fd36360f5
parent61be084efcc4451934257350281962595418a33c
[GFS2] Fix unlink deadlocks

Move the glock acquisition to outside of the transactions.

Lock odering must be preserved in order to prevent ABBA
deadlocks. The current gfs2_change_nlink code would tries
to grab the glock after having started a transaction and thus is holding
the log lock. This is inconsistent with other code paths in
gfs that grab the resource group glock prior to staring
a tranactions.

One problem with this fix is that the resource group
lock is always grabbed now even if the inode still has
ref count and can not be marked for unlink.

Signed-off-by: Russell Cattelan <cattelan@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
fs/gfs2/inode.c
fs/gfs2/ops_inode.c