Skip to contentSkip to conversation

mm: shrinkers: fix debugfs file permissions

PATCH Applied John Keeping 1 participant 1 message Apr 18, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 mm/shrinker_debug.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
mm/shrinker_debug.c +2 -2
index fdd155fd35ed..3f83b10c5031 100644
@@ -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;
 }
Signature · 1 line
2.40.0