From patchwork Fri Apr 15 18:10:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Shi X-Patchwork-Id: 65968 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp82837qge; Fri, 15 Apr 2016 11:35:49 -0700 (PDT) X-Received: by 10.98.69.75 with SMTP id s72mr31692042pfa.66.1460745349077; Fri, 15 Apr 2016 11:35:49 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gl9si5136614pac.111.2016.04.15.11.35.48; Fri, 15 Apr 2016 11:35:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751485AbcDOSfr (ORCPT + 29 others); Fri, 15 Apr 2016 14:35:47 -0400 Received: from mail-pf0-f176.google.com ([209.85.192.176]:35545 "EHLO mail-pf0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750952AbcDOSfq (ORCPT ); Fri, 15 Apr 2016 14:35:46 -0400 Received: by mail-pf0-f176.google.com with SMTP id n1so59314566pfn.2 for ; Fri, 15 Apr 2016 11:35:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=2uzT+SxOD7IVHANjs1KJDROBcBh9z8TmiszTMY+hpr4=; b=gKDBuuAtY5DXq24/zD8E48xFRPpm1kLY35as/Z72p7Jlqms7tlXqCY1VuMFzHOMHuR AzTQh1pNMlz6qBUzPL6vbik+E7wQyNuKw+mRvEeANLUZLNnSGK2ANEX9TchIEWkv4YhT z/zkwzZTykz1CAJK6NhvVzjuFNP/wTPP50+7E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=2uzT+SxOD7IVHANjs1KJDROBcBh9z8TmiszTMY+hpr4=; b=kkyLBwvi4wV70jlMxGte46NFgXqUF45Jbi0v77Ds3VdeRfkx83UgxiwXJDAUiuTNYq TCOGOvOB2rYOTJwxF/3h4GSc9OZcDEebr5VOoImLDixyZdy9GT8JHxwZHpauip5MTmf4 1TTLsDzhs7EzuuwbM41qNLt+YV5499rsw0jE3NJDg6fhCj2J4DTacY1an0Sv3rAh97vk nYEOsTSZiWJhyJa3733v6EKteMVB07N6a1fvg9Y+k85Suv4S+hAEW/Zws3dvcTwRXByi 17eb+SmmQjjbAoOdkrPgmFdnBCYoT7T5F/Hd5iE+CWRJpgzw+CsAOKJKQtWJEnUJt0n8 9V2w== X-Gm-Message-State: AOPr4FUgMZolQJqeGQ/yq3189L93OAUvcjDnZHIy+FcCEJlYL4/Zs5uikQmb+cDB1R+w+rGp X-Received: by 10.98.79.203 with SMTP id f72mr31532582pfj.102.1460745345674; Fri, 15 Apr 2016 11:35:45 -0700 (PDT) Received: from yshi-Precision-T5600.corp.ad.wrs.com (unknown-216-82.windriver.com. [147.11.216.82]) by smtp.gmail.com with ESMTPSA id y27sm66326904pfi.11.2016.04.15.11.35.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Apr 2016 11:35:44 -0700 (PDT) From: Yang Shi To: akpm@linux-foundation.org, kirill.shutemov@linux.intel.com, aarcange@redhat.com, hughd@google.com, mgorman@suse.de Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linaro-kernel@lists.linaro.org, yang.shi@linaro.org Subject: [PATCH] mm: thp: correct split_huge_pages file permission Date: Fri, 15 Apr 2016 11:10:05 -0700 Message-Id: <1460743805-2560-1-git-send-email-yang.shi@linaro.org> X-Mailer: git-send-email 2.0.2 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- mm/huge_memory.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.0.2 diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 86f9f8b..8adf3c2 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -3454,7 +3454,7 @@ next: } } - pr_info("%lu of %lu THP split", split, total); + pr_info("%lu of %lu THP split\n", split, total); return 0; } @@ -3465,7 +3465,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");