summaryrefslogtreecommitdiffstats
path: root/fs/netfs/fscache_proc.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2023-11-21 15:43:52 +0000
committerDavid Howells <dhowells@redhat.com>2023-12-24 15:08:48 +0000
commit7eb5b3e3a0a55f2d166ca949ef47ca6e0c704aab (patch)
tree30357b01626c21f2c231823d099c69e84eceb943 /fs/netfs/fscache_proc.c
parent4498a8eccc97de3d65f876b6fdeddb439ef73abc (diff)
downloadlinux-7eb5b3e3a0a55f2d166ca949ef47ca6e0c704aab.tar.gz
linux-7eb5b3e3a0a55f2d166ca949ef47ca6e0c704aab.tar.bz2
linux-7eb5b3e3a0a55f2d166ca949ef47ca6e0c704aab.zip
netfs, fscache: Move /proc/fs/fscache to /proc/fs/netfs and put in a symlink
Rename /proc/fs/fscache to "netfs" and make a symlink from fscache to that. Signed-off-by: David Howells <dhowells@redhat.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> cc: Christian Brauner <christian@brauner.io> cc: linux-fsdevel@vger.kernel.org cc: linux-cachefs@redhat.com
Diffstat (limited to 'fs/netfs/fscache_proc.c')
-rw-r--r--fs/netfs/fscache_proc.c23
1 files changed, 8 insertions, 15 deletions
diff --git a/fs/netfs/fscache_proc.c b/fs/netfs/fscache_proc.c
index dc3b0e9c8cce..ecd0d1edafaa 100644
--- a/fs/netfs/fscache_proc.c
+++ b/fs/netfs/fscache_proc.c
@@ -12,41 +12,34 @@
#include "internal.h"
/*
- * initialise the /proc/fs/fscache/ directory
+ * Add files to /proc/fs/netfs/.
*/
int __init fscache_proc_init(void)
{
- if (!proc_mkdir("fs/fscache", NULL))
- goto error_dir;
+ if (!proc_symlink("fs/fscache", NULL, "../netfs"))
+ goto error_sym;
- if (!proc_create_seq("fs/fscache/caches", S_IFREG | 0444, NULL,
+ if (!proc_create_seq("fs/netfs/caches", S_IFREG | 0444, NULL,
&fscache_caches_seq_ops))
goto error;
- if (!proc_create_seq("fs/fscache/volumes", S_IFREG | 0444, NULL,
+ if (!proc_create_seq("fs/netfs/volumes", S_IFREG | 0444, NULL,
&fscache_volumes_seq_ops))
goto error;
- if (!proc_create_seq("fs/fscache/cookies", S_IFREG | 0444, NULL,
+ if (!proc_create_seq("fs/netfs/cookies", S_IFREG | 0444, NULL,
&fscache_cookies_seq_ops))
goto error;
-
-#ifdef CONFIG_FSCACHE_STATS
- if (!proc_create_single("fs/fscache/stats", S_IFREG | 0444, NULL,
- fscache_stats_show))
- goto error;
-#endif
-
return 0;
error:
remove_proc_entry("fs/fscache", NULL);
-error_dir:
+error_sym:
return -ENOMEM;
}
/*
- * clean up the /proc/fs/fscache/ directory
+ * Clean up the /proc/fs/fscache symlink.
*/
void fscache_proc_cleanup(void)
{