Skip to contentSkip to conversation

mm: thp: correct split_huge_pages file permission

PATCH In review [email protected] 1 participant 1 message May 5, 2016

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 1/14 mm: thp: correct split_huge_pages file permission

From: Yang Shi <[email protected]>
Subject: mm: thp: correct split_huge_pages file permission

split_huge_pages doesn't support get method at all, so the read permission sounds confusing, change the permission to write only.

And, add "\n" to the output of set method to make it more readable.

---

 mm/huge_memory.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
mm/huge_memory.c renamed from mm/huge_memory.c~mm-thp-correct-split_huge_pages-file-permission +2 -2
diff -puN mm/huge_memory.c~mm-thp-correct-split_huge_pages-file-permission mm/huge_memory.c
@@ -3452,7 +3452,7 @@ next:
 		}
 	}
 
-	pr_info("%lu of %lu THP split", split, total);
+	pr_info("%lu of %lu THP split\n", split, total);
 
 	return 0;
 }
@@ -3463,7 +3463,7 @@ static int __init split_huge_pages_debug
 {
 	void *ret;
 
-	ret = debugfs_create_file("split_huge_pages", 0644, NULL, NULL,
+	ret = debugfs_create_file("split_huge_pages", 0200, NULL, NULL,
 			&split_huge_pages_fops);
 	if (!ret)
 		pr_warn("Failed to create split_huge_pages in debugfs");

_