diff options
author | David Howells <dhowells@redhat.com> | 2023-11-27 13:58:07 +0000 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2023-12-24 15:08:49 +0000 |
commit | c9c4ff12df110feb1b91951010f673f4b16e49e8 (patch) | |
tree | 0145b64f713dc12b3bd82b5032d92f9a28624f3a /fs/afs/write.c | |
parent | 7eb5b3e3a0a55f2d166ca949ef47ca6e0c704aab (diff) | |
download | linux-c9c4ff12df110feb1b91951010f673f4b16e49e8.tar.gz linux-c9c4ff12df110feb1b91951010f673f4b16e49e8.tar.bz2 linux-c9c4ff12df110feb1b91951010f673f4b16e49e8.zip |
netfs: Move pinning-for-writeback from fscache to netfs
Move the resource pinning-for-writeback from fscache code to netfslib code.
This is used to keep a cache backing object pinned whilst we have dirty
pages on the netfs inode in the pagecache such that VM writeback will be
able to reach it.
Whilst we're at it, switch the parameters of netfs_unpin_writeback() to
match ->write_inode() so that it can be used for that directly.
Note that this mechanism could be more generically useful than that for
network filesystems. Quite often they have to keep around other resources
(e.g. authentication tokens or network connections) until the writeback is
complete.
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
cc: linux-cachefs@redhat.com
cc: linux-fsdevel@vger.kernel.org
cc: linux-mm@kvack.org
Diffstat (limited to 'fs/afs/write.c')
-rw-r--r-- | fs/afs/write.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/fs/afs/write.c b/fs/afs/write.c index 4a168781936b..e40cf8e7543a 100644 --- a/fs/afs/write.c +++ b/fs/afs/write.c @@ -23,15 +23,6 @@ static void afs_write_to_cache(struct afs_vnode *vnode, loff_t start, size_t len loff_t i_size, bool caching); #ifdef CONFIG_AFS_FSCACHE -/* - * Mark a page as having been made dirty and thus needing writeback. We also - * need to pin the cache object to write back to. - */ -bool afs_dirty_folio(struct address_space *mapping, struct folio *folio) -{ - return fscache_dirty_folio(mapping, folio, - afs_vnode_cache(AFS_FS_I(mapping->host))); -} static void afs_folio_start_fscache(bool caching, struct folio *folio) { if (caching) |