aboutsummaryrefslogtreecommitdiffstats
path: root/fs/netfs/buffered_read.c
diff options
context:
space:
mode:
authorDavid Howells <[email protected]>2024-07-30 16:01:40 +0000
committerChristian Brauner <[email protected]>2024-08-12 20:03:27 +0000
commit8e5ced7804cb9184c4a23f8054551240562a8eda (patch)
tree1a5a7615ffb88b521f60bd41aed742763eddd521 /fs/netfs/buffered_read.c
parentfile: fix typo in take_fd() comment (diff)
downloadkernel-8e5ced7804cb9184c4a23f8054551240562a8eda.tar.gz
kernel-8e5ced7804cb9184c4a23f8054551240562a8eda.zip
netfs, ceph: Revert "netfs: Remove deprecated use of PG_private_2 as a second writeback flag"
This reverts commit ae678317b95e760607c7b20b97c9cd4ca9ed6e1a. Revert the patch that removes the deprecated use of PG_private_2 in netfslib for the moment as Ceph is actually still using this to track data copied to the cache. Fixes: ae678317b95e ("netfs: Remove deprecated use of PG_private_2 as a second writeback flag") Reported-by: Max Kellermann <[email protected]> Signed-off-by: David Howells <[email protected]> cc: Ilya Dryomov <[email protected]> cc: Xiubo Li <[email protected]> cc: Jeff Layton <[email protected]> cc: Matthew Wilcox <[email protected]> cc: [email protected] cc: [email protected] cc: [email protected] cc: [email protected] https: //lore.kernel.org/r/[email protected] Signed-off-by: Christian Brauner <[email protected]>
Diffstat (limited to 'fs/netfs/buffered_read.c')
-rw-r--r--fs/netfs/buffered_read.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/netfs/buffered_read.c b/fs/netfs/buffered_read.c
index a688d4c75d99..424048f9ed1f 100644
--- a/fs/netfs/buffered_read.c
+++ b/fs/netfs/buffered_read.c
@@ -466,7 +466,7 @@ retry:
if (!netfs_is_cache_enabled(ctx) &&
netfs_skip_folio_read(folio, pos, len, false)) {
netfs_stat(&netfs_n_rh_write_zskip);
- goto have_folio;
+ goto have_folio_no_wait;
}
rreq = netfs_alloc_request(mapping, file,
@@ -507,6 +507,12 @@ retry:
netfs_put_request(rreq, false, netfs_rreq_trace_put_return);
have_folio:
+ if (test_bit(NETFS_ICTX_USE_PGPRIV2, &ctx->flags)) {
+ ret = folio_wait_private_2_killable(folio);
+ if (ret < 0)
+ goto error;
+ }
+have_folio_no_wait:
*_folio = folio;
_leave(" = 0");
return 0;