aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c
diff options
context:
space:
mode:
authorAndreas Gruenbacher <[email protected]>2019-04-29 19:50:30 +0000
committerAndreas Gruenbacher <[email protected]>2019-05-07 21:39:15 +0000
commitd0a22a4b03b8475b7aa3fa41243c26c291407844 (patch)
treeaf68f7f35e0a354aa370d130e9e79b757783b36d /drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c
parentgfs2: fix race between gfs2_freeze_func and unmount (diff)
downloadkernel-d0a22a4b03b8475b7aa3fa41243c26c291407844.tar.gz
kernel-d0a22a4b03b8475b7aa3fa41243c26c291407844.zip
gfs2: Fix iomap write page reclaim deadlock
Since commit 64bc06bb32ee ("gfs2: iomap buffered write support"), gfs2 is doing buffered writes by starting a transaction in iomap_begin, writing a range of pages, and ending that transaction in iomap_end. This approach suffers from two problems: (1) Any allocations necessary for the write are done in iomap_begin, so when the data aren't journaled, there is no need for keeping the transaction open until iomap_end. (2) Transactions keep the gfs2 log flush lock held. When iomap_file_buffered_write calls balance_dirty_pages, this can end up calling gfs2_write_inode, which will try to flush the log. This requires taking the log flush lock which is already held, resulting in a deadlock. Fix both of these issues by not keeping transactions open from iomap_begin to iomap_end. Instead, start a small transaction in page_prepare and end it in page_done when necessary. Reported-by: Edwin Török <[email protected]> Fixes: 64bc06bb32ee ("gfs2: iomap buffered write support") Signed-off-by: Andreas Gruenbacher <[email protected]> Signed-off-by: Bob Peterson <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c')
0 files changed, 0 insertions, 0 deletions