Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c5051c7b authored by David Howells's avatar David Howells
Browse files

afs: Don't wait for page writeback with the page lock held



Drop the page lock before waiting for page writeback.

Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
parent 65a15109
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -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 (PageWriteback(page)) {
			unlock_page(page);
			if (wbc->sync_mode != WB_SYNC_NONE)
				wait_on_page_writeback(page);

		if (PageWriteback(page) || !PageDirty(page)) {
			unlock_page(page);
			put_page(page);
			continue;
		}