Skip to contentSkip to conversation

fuse: Add missed unlock_page() to fuse_readpages_fill()

PATCH New Kirill Tkhai 1 participant 1 message Jul 19, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fuse: Add missed unlock_page() to fuse_readpages_fill()

The above error path returns with page unlocked,
so this place seems also to behave the same.

---
 fs/fuse/file.c |    1 +
 1 file changed, 1 insertion(+)
fs/fuse/file.c +1 -0
index 67648ccbdd43..fe8d84eb714a 100644
@@ -866,6 +866,7 @@ static int fuse_readpages_fill(void *_data, struct page *page)
 	}
 
 	if (WARN_ON(req->num_pages >= req->max_pages)) {
+		unlock_page(page);
 		fuse_put_request(fc, req);
 		return -EIO;
 	}