* [PATCH] mm: shrinkers: fix debugfs file permissions
@ 2023-04-18 10:19 John Keeping
0 siblings, 0 replies; only message in thread
From: John Keeping @ 2023-04-18 10:19 UTC (permalink / raw)
To: Andrew Morton; +Cc: John Keeping, linux-mm, linux-kernel
The permissions for the files here are swapped as "count" is read-only
and "scan" is write-only. While this doesn't really matter as these
permissions don't stop the files being opened for reading/writing as
appropriate, they are shown by "ls -l" and are confusing.
Signed-off-by: John Keeping <john@metanate.com>
---
mm/shrinker_debug.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/shrinker_debug.c b/mm/shrinker_debug.c
index fdd155fd35ed..3f83b10c5031 100644
--- a/mm/shrinker_debug.c
+++ b/mm/shrinker_debug.c
@@ -189,9 +189,9 @@ int shrinker_debugfs_add(struct shrinker *shrinker)
}
shrinker->debugfs_entry = entry;
- debugfs_create_file("count", 0220, entry, shrinker,
+ debugfs_create_file("count", 0440, entry, shrinker,
&shrinker_debugfs_count_fops);
- debugfs_create_file("scan", 0440, entry, shrinker,
+ debugfs_create_file("scan", 0220, entry, shrinker,
&shrinker_debugfs_scan_fops);
return 0;
}
--
2.40.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-04-18 10:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-18 10:19 [PATCH] mm: shrinkers: fix debugfs file permissions John Keeping
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®