Skip to contentSkip to conversation

gfs2: Fix readpage locking

PATCH New Andreas Gruenbacher 1 participant 1 message Jun 30, 2020 GFS2 file system

lore
Share & tools
lore

Andreas Gruenbacher

author maintainer
#0 lore raw

PATCH 1/1 gfs2: Fix readpage locking

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.

Fixes 01b7c7ae88a6 ("[GFS2] Revise readpage locking")
Cc stable at vger.kernel.org # v2.6.27+
---
 fs/gfs2/aops.c | 2 --
 1 file changed, 2 deletions(-)
fs/gfs2/aops.c +0 -2
index 6ccd478c81ff..9b257d3132dc 100644
@@ -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;
 }
 
Signature · 1 line
2.26.2