NFS: Read unlock folio on nfs_page_create_from_folio() error
authorBenjamin Coddington <bcodding@redhat.com>
Thu, 7 Mar 2024 14:41:18 +0000 (09:41 -0500)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Sat, 9 Mar 2024 14:14:51 +0000 (09:14 -0500)
commit11974eec839c167362af685aae5f5e1baaf979eb
tree5634a3326fd0c27b356a248437a90bc7a0ba5fe2
parentcdbd321ac15e1e663c15fc0433024f6487531f27
NFS: Read unlock folio on nfs_page_create_from_folio() error

The netfs conversion lost a folio_unlock() for the case where
nfs_page_create_from_folio() returns an error (usually -ENOMEM).  Restore
it.

Reported-by: David Jeffery <djeffery@redhat.com>
Cc: <stable@vger.kernel.org> # 6.4+
Fixes: 000dbe0bec05 ("NFS: Convert buffered read paths to use netfs when fscache is enabled")
Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
Acked-by: Dave Wysochanski <dwysocha@redhat.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/read.c