diff options
author | Dave Chinner <dchinner@redhat.com> | 2014-08-04 13:29:32 +1000 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2014-08-04 13:29:32 +1000 |
commit | 812176832169c77b4bacddd01edc3e55340263fd (patch) | |
tree | 6f3bde524887cb6f8e66f3d86c89b28118ab795b /ipc | |
parent | b92cc59f69537f26d5a42e4171ccc864ae4d9383 (diff) | |
download | linux-812176832169c77b4bacddd01edc3e55340263fd.tar.gz linux-812176832169c77b4bacddd01edc3e55340263fd.tar.bz2 linux-812176832169c77b4bacddd01edc3e55340263fd.zip |
xfs: fix swapext ilock deadlock
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>
Diffstat (limited to 'ipc')
0 files changed, 0 insertions, 0 deletions