| To: | Dave Chinner <david@xxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH 1/2] xfs: fix swapext ilock deadlock |
| From: | Christoph Hellwig <hch@xxxxxxxxxxxxx> |
| Date: | Thu, 31 Jul 2014 10:15:00 -0700 |
| Cc: | xfs@xxxxxxxxxxx |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <1406787128-11897-2-git-send-email-david@xxxxxxxxxxxxx> |
| References: | <1406787128-11897-1-git-send-email-david@xxxxxxxxxxxxx> <1406787128-11897-2-git-send-email-david@xxxxxxxxxxxxx> |
| User-agent: | Mutt/1.5.23 (2014-03-12) |
On Thu, Jul 31, 2014 at 04:12:07PM +1000, Dave Chinner wrote: > From: Dave Chinner <dchinner@xxxxxxxxxx> > > xfs_swap_extents() holds the ilock over a call to > filemap_write_and_wait(), which can then try to write data and take > the ilock. That causes a self-deadlock. > > Fix the deadlock and clean up the code by separating the locking > appropriately. Add a lockflags variable to track what locks we are > holding as we gain and drop them and cleanup the error handling to > always use "out_unlock" with the lockflags variable. > > Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx> Looks good, Reviewed-by: Christoph Hellwig <hch@xxxxxx> |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH 6/6] xfs: kill xfs_vnode.h, Christoph Hellwig |
|---|---|
| Next by Date: | Re: [PATCH 2/2] xfs: flush both inodes in xfs_swap_extents, Christoph Hellwig |
| Previous by Thread: | [PATCH 1/2] xfs: fix swapext ilock deadlock, Dave Chinner |
| Next by Thread: | [PATCH 2/2] xfs: flush both inodes in xfs_swap_extents, Dave Chinner |
| Indexes: | [Date] [Thread] [Top] [All Lists] |