提交 145bdaa1 编写于 作者: Y Yang Shi 提交者: Linus Torvalds

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: NYang Shi <yang.shi@linaro.org>
Acked-by: NKirill 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: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 c5e0666c
......@@ -3452,7 +3452,7 @@ static int split_huge_pages_set(void *data, u64 val)
}
}
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_debugfs(void)
{
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");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册