Skip to content

Commit 2124f79

Browse files
johnkeepingakpm00
authored andcommitted
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.com Signed-off-by: John Keeping <john@metanate.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent f3ebdf0 commit 2124f79

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

mm/shrinker_debug.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,9 @@ int shrinker_debugfs_add(struct shrinker *shrinker)
189189
}
190190
shrinker->debugfs_entry = entry;
191191

192-
debugfs_create_file("count", 0220, entry, shrinker,
192+
debugfs_create_file("count", 0440, entry, shrinker,
193193
&shrinker_debugfs_count_fops);
194-
debugfs_create_file("scan", 0440, entry, shrinker,
194+
debugfs_create_file("scan", 0220, entry, shrinker,
195195
&shrinker_debugfs_scan_fops);
196196
return 0;
197197
}

0 commit comments

Comments
 (0)