Skip to content

Commit

Permalink
mm: shrinkers: fix debugfs file permissions
Browse files Browse the repository at this point in the history
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.com
Signed-off-by: John Keeping <john@metanate.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
  • Loading branch information
John Keeping authored and Andrew Morton committed Apr 21, 2023
1 parent f3ebdf0 commit 2124f79
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mm/shrinker_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 2124f79

Please sign in to comment.