[PATCH] netfs: Pass flags through to grab_cache_page_write_begin()

David Howells dhowells at redhat.com
Thu May 13 11:49:13 BST 2021


In netfs_write_begin(), pass the AOP flags through to
grab_cache_page_write_begin() so that a request to use GFP_NOFS is honoured.

Fixes: e1b1240c1ff5 ("netfs: Add write_begin helper")
Reported-by: Matthew Wilcox (Oracle) <willy at infradead.org>
Signed-off-by: David Howells <dhowells at redhat.com>
cc: linux-mm at kvack.org
cc: linux-cachefs at redhat.com
cc: linux-afs at lists.infradead.org
cc: linux-nfs at vger.kernel.org
cc: linux-cifs at vger.kernel.org
cc: ceph-devel at vger.kernel.org
cc: v9fs-developer at lists.sourceforge.net
cc: linux-fsdevel at vger.kernel.org
---

 fs/netfs/read_helper.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/netfs/read_helper.c b/fs/netfs/read_helper.c
index 193841d03de0..725614625ed4 100644
--- a/fs/netfs/read_helper.c
+++ b/fs/netfs/read_helper.c
@@ -1068,7 +1068,7 @@ int netfs_write_begin(struct file *file, struct address_space *mapping,
 	DEFINE_READAHEAD(ractl, file, NULL, mapping, index);
 
 retry:
-	page = grab_cache_page_write_begin(mapping, index, 0);
+	page = grab_cache_page_write_begin(mapping, index, flags);
 	if (!page)
 		return -ENOMEM;
 





More information about the linux-afs mailing list