From: Christoph Hellwig <hch@infradead.org>
To: Dave Chinner <david@fromorbit.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH 1/2] xfs: fix swapext ilock deadlock
Date: Thu, 31 Jul 2014 10:15:00 -0700 [thread overview]
Message-ID: <20140731171500.GE22173@infradead.org> (raw)
In-Reply-To: <1406787128-11897-2-git-send-email-david@fromorbit.com>
On Thu, Jul 31, 2014 at 04:12:07PM +1000, Dave Chinner wrote:
> From: Dave Chinner <dchinner@redhat.com>
>
> 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@redhat.com>
Looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2014-07-31 17:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-31 6:12 [PATCH 0/2] xfs: extent swap fixes Dave Chinner
2014-07-31 6:12 ` [PATCH 1/2] xfs: fix swapext ilock deadlock Dave Chinner
2014-07-31 17:15 ` Christoph Hellwig [this message]
2014-07-31 6:12 ` [PATCH 2/2] xfs: flush both inodes in xfs_swap_extents Dave Chinner
2014-07-31 17:16 ` Christoph Hellwig
2014-07-31 23:02 ` Dave Chinner
2014-08-01 12:44 ` Brian Foster
2014-08-02 3:19 ` Dave Chinner
2014-08-02 11:24 ` Brian Foster
-- strict thread matches above, loose matches on Subject: below --
2014-06-06 8:22 [PATCH 0/2] xfs: fix a couple of swap extent issues Dave Chinner
2014-06-06 8:22 ` [PATCH 1/2] xfs: fix swapext ilock deadlock Dave Chinner
2014-06-06 19:59 ` Brian Foster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140731171500.GE22173@infradead.org \
--to=hch@infradead.org \
--cc=david@fromorbit.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox