Commit 2124f79d authored by John Keeping's avatar John Keeping Committed by Andrew Morton

mm: shrinkers: fix debugfs file permissions

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.

Link: https://lkml.kernel.org/r/20230418101906.3131303-1-john@metanate.comSigned-off-by: default avatarJohn Keeping <john@metanate.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent f3ebdf04
...@@ -189,9 +189,9 @@ int shrinker_debugfs_add(struct shrinker *shrinker) ...@@ -189,9 +189,9 @@ int shrinker_debugfs_add(struct shrinker *shrinker)
} }
shrinker->debugfs_entry = entry; shrinker->debugfs_entry = entry;
debugfs_create_file("count", 0220, entry, shrinker, debugfs_create_file("count", 0440, entry, shrinker,
&shrinker_debugfs_count_fops); &shrinker_debugfs_count_fops);
debugfs_create_file("scan", 0440, entry, shrinker, debugfs_create_file("scan", 0220, entry, shrinker,
&shrinker_debugfs_scan_fops); &shrinker_debugfs_scan_fops);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment