From nobody Wed Dec 17 17:27:55 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 91D8BC77B71 for ; Tue, 18 Apr 2023 10:19:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231293AbjDRKTy (ORCPT ); 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 Content-Transfer-Encoding: quoted-printable X-Authenticated: YES Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 =3D entry; =20 - 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; } --=20 2.40.0