diff options
author | David Howells <dhowells@redhat.com> | 2022-03-04 10:34:27 +0000 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2023-12-24 15:08:49 +0000 |
commit | 87b57a048964abfd5f3d8b79bc55687327f5a380 (patch) | |
tree | da96f2d7790757766f978f6fe3322a127b25af1f /fs/netfs/objects.c | |
parent | c9c4ff12df110feb1b91951010f673f4b16e49e8 (diff) | |
download | linux-stable-87b57a048964abfd5f3d8b79bc55687327f5a380.tar.gz linux-stable-87b57a048964abfd5f3d8b79bc55687327f5a380.tar.bz2 linux-stable-87b57a048964abfd5f3d8b79bc55687327f5a380.zip |
netfs: Add a procfile to list in-progress requests
Add a procfile, /proc/fs/netfs/requests, to list in-progress netfslib I/O
requests.
Signed-off-by: David Howells <dhowells@redhat.com>
cc: 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/netfs/objects.c')
-rw-r--r-- | fs/netfs/objects.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/netfs/objects.c b/fs/netfs/objects.c index e17cdf53f6a7..85f428fc52e6 100644 --- a/fs/netfs/objects.c +++ b/fs/netfs/objects.c @@ -45,6 +45,7 @@ struct netfs_io_request *netfs_alloc_request(struct address_space *mapping, } } + netfs_proc_add_rreq(rreq); netfs_stat(&netfs_n_rh_rreq); return rreq; } @@ -76,12 +77,13 @@ static void netfs_free_request(struct work_struct *work) container_of(work, struct netfs_io_request, work); trace_netfs_rreq(rreq, netfs_rreq_trace_free); + netfs_proc_del_rreq(rreq); netfs_clear_subrequests(rreq, false); if (rreq->netfs_ops->free_request) rreq->netfs_ops->free_request(rreq); if (rreq->cache_resources.ops) rreq->cache_resources.ops->end_operation(&rreq->cache_resources); - kfree(rreq); + kfree_rcu(rreq, rcu); netfs_stat_d(&netfs_n_rh_rreq); } |