瀏覽代碼

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>
Yang Shi 9 年之前
父節點
當前提交
145bdaa150
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      mm/huge_memory.c

+ 2 - 2
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;
 	return 0;
 }
 }
@@ -3463,7 +3463,7 @@ static int __init split_huge_pages_debugfs(void)
 {
 {
 	void *ret;
 	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);
 			&split_huge_pages_fops);
 	if (!ret)
 	if (!ret)
 		pr_warn("Failed to create split_huge_pages in debugfs");
 		pr_warn("Failed to create split_huge_pages in debugfs");