diff options
author | Dave Chinner <dchinner@redhat.com> | 2014-08-04 13:29:32 +1000 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2016-06-15 21:29:32 +0100 |
commit | 9c457aeadcd3379f06da88647e294cfb5f3ec1da (patch) | |
tree | 9b6a3b7cdec9f880c8c9eb0b8a96f4ecd8a98805 /fs/xfs/xfs_stats.c | |
parent | 11e2f8dc61c5efca6eb37dfb40ede38c35c0d5be (diff) | |
download | linux-stable-9c457aeadcd3379f06da88647e294cfb5f3ec1da.tar.gz linux-stable-9c457aeadcd3379f06da88647e294cfb5f3ec1da.tar.bz2 linux-stable-9c457aeadcd3379f06da88647e294cfb5f3ec1da.zip |
xfs: fix swapext ilock deadlock
commit 812176832169c77b4bacddd01edc3e55340263fd upstream.
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>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'fs/xfs/xfs_stats.c')
0 files changed, 0 insertions, 0 deletions