[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200917151050.5363-3-willy@infradead.org>
Date: Thu, 17 Sep 2020 16:10:39 +0100
From: "Matthew Wilcox (Oracle)" <willy@...radead.org>
To: linux-fsdevel@...r.kernel.org
Cc: "Matthew Wilcox (Oracle)" <willy@...radead.org>,
linux-mm@...ck.org, v9fs-developer@...ts.sourceforge.net,
linux-kernel@...r.kernel.org, linux-afs@...ts.infradead.org,
ceph-devel@...r.kernel.org, linux-cifs@...r.kernel.org,
ecryptfs@...r.kernel.org, linux-um@...ts.infradead.org,
linux-mtd@...ts.infradead.org, Richard Weinberger <richard@....at>
Subject: [PATCH 02/13] 9p: Tell the VFS that readpage was synchronous
The 9p readpage implementation was already synchronous, so use
AOP_UPDATED_PAGE to avoid cycling the page lock.
Signed-off-by: Matthew Wilcox (Oracle) <willy@...radead.org>
---
fs/9p/vfs_addr.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/fs/9p/vfs_addr.c b/fs/9p/vfs_addr.c
index cce9ace651a2..506ca0ba2ec7 100644
--- a/fs/9p/vfs_addr.c
+++ b/fs/9p/vfs_addr.c
@@ -65,7 +65,7 @@ static int v9fs_fid_readpage(void *data, struct page *page)
SetPageUptodate(page);
v9fs_readpage_to_fscache(inode, page);
- retval = 0;
+ return AOP_UPDATED_PAGE;
done:
unlock_page(page);
@@ -280,6 +280,10 @@ static int v9fs_write_begin(struct file *filp, struct address_space *mapping,
goto out;
retval = v9fs_fid_readpage(v9inode->writeback_fid, page);
+ if (retval == AOP_UPDATED_PAGE) {
+ retval = 0;
+ goto out;
+ }
put_page(page);
if (!retval)
goto start;
--
2.28.0
Powered by blists - more mailing lists