]> git.karo-electronics.de Git - karo-tx-linux.git/commit
xfs: fix dquot shaker deadlock
authorDave Chinner <dchinner@redhat.com>
Fri, 28 Jan 2011 00:20:46 +0000 (11:20 +1100)
committerAlex Elder <aelder@sgi.com>
Fri, 28 Jan 2011 15:05:36 +0000 (09:05 -0600)
commit0fbca4d1c3932c27c4794bf5c2b5fc961cf5a54f
tree3c031847453c5222410e04e40d1152207a1c18a2
parentc6f990d1ff8e4e53b12f4175eb7d7ea710c3ca73
xfs: fix dquot shaker deadlock

Commit 368e136 ("xfs: remove duplicate code from dquot reclaim") fails
to unlock the dquot freelist when the number of loop restarts is
exceeded in xfs_qm_dqreclaim_one(). This causes hangs in memory
reclaim.

Rework the loop control logic into an unwind stack that all the
different cases jump into. This means there is only one set of code
that processes the loop exit criteria, and simplifies the unlocking
of all the items from different points in the loop. It also fixes a
double increment of the restart counter from the qi_dqlist_lock
case.

Reported-by: Malcolm Scott <lkml@malc.org.uk>
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Alex Elder <aelder@sgi.com>
fs/xfs/quota/xfs_qm.c