From patchwork Tue Apr 18 10:19:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Keeping X-Patchwork-Id: 84741 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2738876vqo; Tue, 18 Apr 2023 03:32:22 -0700 (PDT) X-Google-Smtp-Source: AKy350YpjvVjZp3dxv7Pyip7hAtQFkU7ZWjlwJlCfmUyYMBzjrTqhsny+AKxuhT6HGPaaI5yF5/S X-Received: by 2002:a17:903:52:b0:1a1:d366:b085 with SMTP id l18-20020a170903005200b001a1d366b085mr1586976pla.21.1681813942215; Tue, 18 Apr 2023 03:32:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681813942; cv=none; d=google.com; s=arc-20160816; b=oZqCqNzFIqNq2sJQbIh7inrzgrKKNZSdkBhYnEOSxUBgggnoY51s4pxhoOHHHPR3o4 5lQQrYVxlKT9Br2NsCPirFpupZc5E554NXAYEi4nzAAwTyFyT1td+DzP52SqHLY1luEj 6HbjfsMaZM5OqKrRJRNIRPyY/5mgqQ+y1+YnkAxbDgK9H48AKtCImVB7Db6wt/GrGMKY YHEMii+Gn2wquxcYvZ8fDgjmtFu1QW7ih9EdWPgmP3Ansl57a81wpdXPZAH8P6T/USCr bpbNUFxUcGEE6Tk3x4M8L7LM0TMbSathYTYaz5YYtBs4akloLCQ6EqDw6A0zL4sTVZhT dPHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=WYNEh7cNmGtax43oDrfN3nLtG1zDVb6WEjNGyKiMTc0=; b=BB6BDPAHRjxEx81kg6wxgT4bEzQwtp8E29lAVuUTSXuYl2yGF20qQDBNmzVwKNevTI EClSWPp6Ongr/6t5Fv+zDnyP9nplif4caF4RiFGQ0cURm+h8Mlwg11vx/ozcQqr2OGj4 aiUV3Yaeh8lYYmwco3ryC9tQXYn1F2En7r+p9x3Srgl3ZmJFmjK5fSKJkxceDHup65Qt /JZjgullIZgnuWw3bNidszEgU6f9PPsjqqunk0/xcfLgGBDUtNbeRQUwOjMXtsK4/4w9 yJWoYL37z/HUanrNeM1nq9oSei6ERe4ifci1XHlHnZH+ZRVtds8jrSmNhxQB965mFvsL B16A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@metanate.com header.s=stronger header.b=weZRTMjY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=metanate.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id iw18-20020a170903045200b001a64a25c808si13221771plb.5.2023.04.18.03.32.09; Tue, 18 Apr 2023 03:32:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@metanate.com header.s=stronger header.b=weZRTMjY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=metanate.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231287AbjDRKTy (ORCPT + 99 others); Tue, 18 Apr 2023 06:19:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231309AbjDRKTf (ORCPT ); Tue, 18 Apr 2023 06:19:35 -0400 Received: from metanate.com (unknown [IPv6:2001:8b0:1628:5005::111]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D75569034 for ; Tue, 18 Apr 2023 03:19:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=metanate.com; s=stronger; h=Content-Transfer-Encoding:Message-Id:Date: Subject:Cc:To:From:Content-Type:Reply-To:Content-ID:Content-Description: In-Reply-To:References; bh=WYNEh7cNmGtax43oDrfN3nLtG1zDVb6WEjNGyKiMTc0=; b=we ZRTMjYAeJ0/QMCQjdZaCMe/UWmjYfDF2EKQDxK+Xsl5pw6fJkDBx6Y1LzpxqT0nxzPnSrvEbeT/Vr Y8H5IZbv4imivNBs5N3DwMKD9BDQf9WBP4P4U0bZfXX2ytUp2kV9MpE3+fDa4FD9wzTwst2LZEhIw jXuDYdORlqfr4Njb/1J8YmZu9nKqDVNeIyRXzKga4vmdhWMOVA1usx7muxiIFPy3aG/qZT4NVa7Fn 94Co4U24Gf+rwpN68X+UTSUHt9d/GHYA02H1bekhht0Vd3Itso0HKi/AopiOrZiNP4Moc4vJ4ja6p 5fBP+i4Dd05nO2ssaPCQZMWLI6a6eTHg==; Received: from [81.174.171.191] (helo=donbot.metanate.com) by email.metanate.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1poiQZ-0006Qi-BC; Tue, 18 Apr 2023 11:19:12 +0100 From: John Keeping To: Andrew Morton Cc: John Keeping , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH] mm: shrinkers: fix debugfs file permissions Date: Tue, 18 Apr 2023 11:19:05 +0100 Message-Id: <20230418101906.3131303-1-john@metanate.com> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 X-Authenticated: YES X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RDNS_NONE,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763509736043372215?= X-GMAIL-MSGID: =?utf-8?q?1763509736043372215?= The permissions for the files here are swapped as "count" is read-only and "scan" is write-only. While this doesn't really matter as these permissions don't stop the files being opened for reading/writing as appropriate, they are shown by "ls -l" and are confusing. Signed-off-by: John Keeping --- mm/shrinker_debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/shrinker_debug.c b/mm/shrinker_debug.c index fdd155fd35ed..3f83b10c5031 100644 --- a/mm/shrinker_debug.c +++ b/mm/shrinker_debug.c @@ -189,9 +189,9 @@ int shrinker_debugfs_add(struct shrinker *shrinker) } shrinker->debugfs_entry = entry; - debugfs_create_file("count", 0220, entry, shrinker, + debugfs_create_file("count", 0440, entry, shrinker, &shrinker_debugfs_count_fops); - debugfs_create_file("scan", 0440, entry, shrinker, + debugfs_create_file("scan", 0220, entry, shrinker, &shrinker_debugfs_scan_fops); return 0; }