Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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.

Signed-off-by: Yang Shi <yang.shi@linaro.org>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Yang Shi and committed by
Linus Torvalds
145bdaa1 c5e0666c

+2 -2
+2 -2
mm/huge_memory.c
··· 3452 3452 } 3453 3453 } 3454 3454 3455 - pr_info("%lu of %lu THP split", split, total); 3455 + pr_info("%lu of %lu THP split\n", split, total); 3456 3456 3457 3457 return 0; 3458 3458 } ··· 3463 3463 { 3464 3464 void *ret; 3465 3465 3466 - ret = debugfs_create_file("split_huge_pages", 0644, NULL, NULL, 3466 + ret = debugfs_create_file("split_huge_pages", 0200, NULL, NULL, 3467 3467 &split_huge_pages_fops); 3468 3468 if (!ret) 3469 3469 pr_warn("Failed to create split_huge_pages in debugfs");