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

Commit f8909ed6 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "fs: fuse: lock the new non-CMA page before replace_page_cache_page()"

parents f7f94b49 9fd1605e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -914,8 +914,10 @@ static int fuse_readpages_fill(void *_data, struct page *page)
			return -ENOMEM;
		}

		lock_page(newpage);
		err = replace_page_cache_page(oldpage, newpage, GFP_KERNEL);
		if (err) {
			unlock_page(newpage);
			__free_page(newpage);
			page_cache_release(oldpage);
			return err;
@@ -925,7 +927,6 @@ static int fuse_readpages_fill(void *_data, struct page *page)
		 * Decrement the count on new page to make page cache the only
		 * owner of it
		 */
		lock_page(newpage);
		put_page(newpage);

		/* finally release the old page and swap pointers */