]> git.karo-electronics.de Git - karo-tx-linux.git/commit
xfs: fix stray dquot unlock when reclaiming dquots
authorDave Chinner <dchinner@redhat.com>
Wed, 28 Nov 2012 02:01:02 +0000 (13:01 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Jan 2013 17:18:53 +0000 (09:18 -0800)
commitf8b723cc9f1a9eec83c8527d67eedc6249b7fb66
tree19eecb7f9b2e5a377ad21f87b3c425c6471859bb
parent82251473514fde36ce8dc0167f41eaf7ef6a4cb9
xfs: fix stray dquot unlock when reclaiming dquots

commit b870553cdecb26d5291af09602352b763e323df2 upstream.

When we fail to get a dquot lock during reclaim, we jump to an error
handler that unlocks the dquot. This is wrong as we didn't lock the
dquot, and unlocking it means who-ever is holding the lock has had
it silently taken away, and hence it results in a lock imbalance.

Found by inspection while modifying the code for the numa-lru
patchset. This fixes a random hang I've been seeing on xfstest 232
for the past several months.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/xfs/xfs_qm.c