From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Gruenbacher Date: Tue, 30 Jun 2020 16:58:57 +0200 Subject: [Cluster-devel] [PATCH] gfs2: Fix readpage locking Message-ID: <20200630145857.1411226-1-agruenba@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 Fixes: 01b7c7ae88a6 ("[GFS2] Revise readpage locking") Cc: stable at vger.kernel.org # v2.6.27+ Signed-off-by: Andreas Gruenbacher --- 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