* [Cluster-devel] [PATCH] gfs2: Fix readpage locking
@ 2020-06-30 14:58 Andreas Gruenbacher
0 siblings, 0 replies; only message in thread
From: Andreas Gruenbacher @ 2020-06-30 14:58 UTC (permalink / raw)
To: cluster-devel.redhat.com
The readpage address space operation is passed a locked page and is
supposed to unlock the page, either synchronously or via I/O completion.
In particular, it must never return a locked page on error.
Reported-by: Matthew Wilcox <willy@infradead.org>
Fixes: 01b7c7ae88a6 ("[GFS2] Revise readpage locking")
Cc: stable at vger.kernel.org # v2.6.27+
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
---
fs/gfs2/aops.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c
index 6ccd478c81ff..9b257d3132dc 100644
--- a/fs/gfs2/aops.c
+++ b/fs/gfs2/aops.c
@@ -532,8 +532,6 @@ static int gfs2_readpage(struct file *file, struct page *page)
gfs2_glock_dq(&gh);
out:
gfs2_holder_uninit(&gh);
- if (error && error != AOP_TRUNCATED_PAGE)
- lock_page(page);
return error;
}
--
2.26.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-06-30 14:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-30 14:58 [Cluster-devel] [PATCH] gfs2: Fix readpage locking Andreas Gruenbacher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).