mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-04 02:26:56 +07:00
afs: Don't wait for page writeback with the page lock held
Drop the page lock before waiting for page writeback. Signed-off-by: David Howells <dhowells@redhat.com>
This commit is contained in:
parent
65a151094e
commit
c5051c7bc7
@ -518,17 +518,16 @@ static int afs_writepages_region(struct address_space *mapping,
|
||||
*/
|
||||
lock_page(page);
|
||||
|
||||
if (page->mapping != mapping) {
|
||||
if (page->mapping != mapping || !PageDirty(page)) {
|
||||
unlock_page(page);
|
||||
put_page(page);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (wbc->sync_mode != WB_SYNC_NONE)
|
||||
wait_on_page_writeback(page);
|
||||
|
||||
if (PageWriteback(page) || !PageDirty(page)) {
|
||||
if (PageWriteback(page)) {
|
||||
unlock_page(page);
|
||||
if (wbc->sync_mode != WB_SYNC_NONE)
|
||||
wait_on_page_writeback(page);
|
||||
put_page(page);
|
||||
continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user