From patchwork Fri Jan 5 15:21:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandr Mikhalitsyn X-Patchwork-Id: 185429 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp6287535dyb; Fri, 5 Jan 2024 07:22:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IGA/HrQ+ADv/loaJttPP+VTU8l8KAO2f/qh7DCH+RzV+r0SiD1vihq+FRvbkEmfNIWfRiPh X-Received: by 2002:a05:6a21:32a4:b0:197:c584:e1ee with SMTP id yt36-20020a056a2132a400b00197c584e1eemr1943746pzb.63.1704468158756; Fri, 05 Jan 2024 07:22:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704468158; cv=none; d=google.com; s=arc-20160816; b=gltfuC6dBmPvBJXw9P9rCO+4aepFyLDuz0YFjoBz0Lxe/ZZdumYT7Fio+P/3u8IFif 1bCR2V4c1UMh6eYz4n+jKXw3DezjgVSzgevPz2RcncC2ALUUWSGyjklR7cA5UdRX8+bw m3twC2sp5T2EAAhXBrLOFVa/bCeKn605ZPdX9paXhoxB93noWDb4c9US8cKgrWFczss0 uspxrAUQnB2vE+fpoOnOq2sHLrpI3zHd3onURKt48KkDdmZgLCMsZ0Vvhkj38/qyV+v/ I+q9E5vL6eSesP8MpsPzs+wixmNvCJ9WUvvJXj83L9/Bl5fX4XfSkzXCCWNp33v7+59D hm6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=va+R088LK5HPp976U93J7EMukikDVxpd8L8bbCz8s64=; fh=m8vRNmsbnhTC1mjydsUfvtngF805Ge2E/aCI2+KrOi8=; b=cMGVOCh8eWuUqsq5r8GXF4bgPRXvqxJHOlU0PRGhrsT+AVPbtkNB5Jg8Mk+fRYnNcZ DN6l1vh2IzIB4B+U8RzRfXz/oWKWLnMYwzEBgjMI0F+RjTaKjoSGfk+C0mt334HwRMdb k8LZaJEPLHPgZRGGdTatSP5DsnBvmhsFyjyq0uLCw4Hf58CRA2NJGbih/yWqrgRyqajN 2ePlV++lX0on7O1ZxaZ39gtt5qVlk3j64+x8P12zrLcKpCPxa4aZ6xQl9PvgvqlIAJ0B WjarmxHZYGahiE/0+3aSLuL9433OswWVHlbTsMtttMqqoLGPS91Mnt/cUltY6uqWSh/7 DTXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=OTdPdfL4; spf=pass (google.com: domain of linux-kernel+bounces-17989-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17989-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id h20-20020a056a00231400b006d9e76be7f0si1437554pfh.301.2024.01.05.07.22.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jan 2024 07:22:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-17989-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=OTdPdfL4; spf=pass (google.com: domain of linux-kernel+bounces-17989-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17989-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 548D3B21BD9 for ; Fri, 5 Jan 2024 15:22:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4495B2E851; Fri, 5 Jan 2024 15:21:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=canonical.com header.i=@canonical.com header.b="OTdPdfL4" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 210F12E825 for ; Fri, 5 Jan 2024 15:21:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=canonical.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=canonical.com Received: from mail-lf1-f72.google.com (mail-lf1-f72.google.com [209.85.167.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 6BF6F3F2C4 for ; Fri, 5 Jan 2024 15:21:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1704468112; bh=va+R088LK5HPp976U93J7EMukikDVxpd8L8bbCz8s64=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=OTdPdfL4vD88WxjnXOS8DD5iLwX3e7wWdtD9P7YoHSs1fdFhDNnavWmqVxPpN1WFY 1e/HX1qtjoL5zaazt2OVcRyNuv4zf326Jxt9x6h5h4laoPbsBsQsOjo6+tItU9efXr EZ30cCCUq2/QRcfzxnxQeuQCeBchjnGRv4e21dXc+e12Chv74bpRS6gJwUOkCptgkk doMjxd8YPN8X6ZPiAVKNqouxH7qOBvY/nS2hYODZJv5Kuny7x97FN0P58jNCkeO/7n Vgt1+r7cR3wPD1cpNSxNgp+JAkYMew5tPVUXJ8X42piKf2cq9CAmKZyyFqvK3zzHdk mteQyU0dq+yvg== Received: by mail-lf1-f72.google.com with SMTP id 2adb3069b0e04-50e7b5c3582so1407195e87.1 for ; Fri, 05 Jan 2024 07:21:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704468111; x=1705072911; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=va+R088LK5HPp976U93J7EMukikDVxpd8L8bbCz8s64=; b=cRfvuUZul0qefSokn2an+sdJVPz3qlZ6Ni/sktbzoPNvFB1U0hy/6WFrRmvWxVwtKN zm8OAmdUu2ZOWdY6rcnYkPgHgRPD9G1hxyEmjD8CX6M/GhjP5CMETkmWJK5AhnIPcad7 2iPqZTWHjWkIT3bp+wuAB1ulqs0qyvCNrMhFDha7txXFF8GuP2Kn7NPzO2mpN86nEx8q vxsudgx6ppgwpmcKb/rtEfTef11zIe3rhLYBy9eekc5rCJEjUx/tnIxtNwrhPWJLP17n bMDWJOsmqPx5nQTOS0yRgja8firke7yC/xSYO3prwiYCEDf6xglpEmTcJj98OrAJd7hW c47Q== X-Gm-Message-State: AOJu0Yw/TDXMT8+NSQMjUsGhKA/PWMeGfLU9RiOaDOUGgU7nFn/vy9Jy apLzPyasRZdWDrC56qjTn0caHHo7yWak42tEgfQwKKpGqLiaycz9WXrJd4Ug5aLwc08Tgj0T2fH /CoSbQDJfbCrhuLvrragqMR4SZDIeyj03YPg2sdHiTMnQWgEPhZ18CQ7n X-Received: by 2002:a05:6512:6c7:b0:50e:4375:712 with SMTP id u7-20020a05651206c700b0050e43750712mr1334021lff.16.1704468111588; Fri, 05 Jan 2024 07:21:51 -0800 (PST) X-Received: by 2002:a05:6512:6c7:b0:50e:4375:712 with SMTP id u7-20020a05651206c700b0050e43750712mr1334017lff.16.1704468111287; Fri, 05 Jan 2024 07:21:51 -0800 (PST) Received: from amikhalitsyn.lan ([91.64.72.41]) by smtp.gmail.com with ESMTPSA id i23-20020a170906115700b00a298adde5a1sm345630eja.189.2024.01.05.07.21.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jan 2024 07:21:50 -0800 (PST) From: Alexander Mikhalitsyn To: mszeredi@redhat.com Cc: Alexander Mikhalitsyn , Miklos Szeredi , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 1/3] fuse: fix typo for fuse_permission comment Date: Fri, 5 Jan 2024 16:21:27 +0100 Message-Id: <20240105152129.196824-2-aleksandr.mikhalitsyn@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240105152129.196824-1-aleksandr.mikhalitsyn@canonical.com> References: <20240105152129.196824-1-aleksandr.mikhalitsyn@canonical.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787264404127959470 X-GMAIL-MSGID: 1787264404127959470 Found by chance while working on support for idmapped mounts in fuse. Cc: Miklos Szeredi Cc: Cc: Signed-off-by: Alexander Mikhalitsyn --- fs/fuse/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index d19cbf34c634..6f5f9ff95380 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c @@ -1485,7 +1485,7 @@ static int fuse_perm_getattr(struct inode *inode, int mask) * * 1) Local access checking ('default_permissions' mount option) based * on file mode. This is the plain old disk filesystem permission - * modell. + * model. * * 2) "Remote" access checking, where server is responsible for * checking permission in each inode operation. An exception to this From patchwork Fri Jan 5 15:21:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandr Mikhalitsyn X-Patchwork-Id: 185430 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp6287619dyb; Fri, 5 Jan 2024 07:22:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IGrar4Zt5uPIgMrOHSFmVEo8Wk0Rb4w9BiKOmeKAxbRZquX97YnxIvwZTvqKIrqX+sOVYqY X-Received: by 2002:a05:622a:138b:b0:428:2654:eaae with SMTP id o11-20020a05622a138b00b004282654eaaemr2613354qtk.97.1704468166901; Fri, 05 Jan 2024 07:22:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704468166; cv=none; d=google.com; s=arc-20160816; b=jWwRXWzHYl1Gno5JTMqysKcyP1bvOm4gIkQ6FQprG/UcXKyG9+Z0Fec7Ui5XBlsvHf goG0HxjDabCJNAC2ilX3qCxHOnC+kegDB4+GaNZUSFVeZux7Qn4u2Ctm42m8vv/L6vhi e04iQT0m/FzRUK6OSDY+jzPHvEi5Shg1AFFuWJkKvGjFIkc1QM0AKm2zRFBfnqhDidMv +70PNnHQULhZaG2HsIVLKd/461X+3PR5IlZ0HaY8RBdtgKvt+5e0/OtHcsmLIn/rYOGu Ww8OVQEh8+ZrUCdHJeqyeSO+WHpk4yGizXwcpK/KmwfPDyBOcleIr5/BOLBONXfOoYlf +FEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=lY3Wm0rqUAhsDJUxSGP7DuG2vuWegRTpE6t0VrqtHps=; fh=M4lKxbx7t4+v8w8mr3dCDGJLS5GyU9pIAnhNR3sOycQ=; b=Qcmheoqus70SfOowJIrsnHlDyIYQrqF9951nMj+cNX4YQrSTlkxGhaN1sUAlkKM/hz vda42N6YPvxalAF4V5KJg94PUoZkUE8PRPYJ8/6szQzs70Wn8L/zEU3b5GmJjBkII6xW 43WhQn8xBWXfaQgAF2Ct9jMn7wO0wpZNmJQX85HnD94lMQTdAQDHsMDaADcCLgKEvOI2 TSAV7x99mfaPEpgNNa7BP0KSChW6i4M37slzPoJHci5UMpMAMxXsPmLAcuimY6uFC1q0 l2+Gqj3DmWRGSrSS7ZuqfXCbO2d/OknEl6qYgKvOl3U89W/UpS/YT/Gq4UdCNx80jaOz uoPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b="jeLTI0B/"; spf=pass (google.com: domain of linux-kernel+bounces-17990-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17990-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id z1-20020ac87f81000000b00427ea0d926dsi2042822qtj.273.2024.01.05.07.22.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jan 2024 07:22:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-17990-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b="jeLTI0B/"; spf=pass (google.com: domain of linux-kernel+bounces-17990-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17990-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id AE0C21C2283F for ; Fri, 5 Jan 2024 15:22:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 400BE31A66; Fri, 5 Jan 2024 15:22:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=canonical.com header.i=@canonical.com header.b="jeLTI0B/" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1DDE62E849 for ; Fri, 5 Jan 2024 15:21:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=canonical.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=canonical.com Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id A75683F154 for ; Fri, 5 Jan 2024 15:21:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1704468118; bh=lY3Wm0rqUAhsDJUxSGP7DuG2vuWegRTpE6t0VrqtHps=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=jeLTI0B/iGD4kYv1X6OzcLyIqcUp9pAx63SDlbSVBTrPjzAMsGIMXLWcuk5rdBm81 XOmLAGFOynjdiHiWnc4yUjZsGXM5xsGwx+qhd6heNdbSlAiUO6ULewRMlwvcKd1MuJ gCkOMqg3pnnXgZrSA71kRR1um5A1qpJD8azBFvBGDKpnNx/6fBClFWSzlffVMeBiu7 gYG/OqLeEEmDZDx5L5DXMa2e+viiujjU/7296/n3KgKeCJ4NKj9Yfpog0HtU+6K6oY Lk3d8/8f0sQJtgeYlp1wqYVxCM+OOwK9++JWj+8uFFwcq1r6AfgEAum0M5QoJYUbyL 4sY7XEAIxvByw== Received: by mail-ej1-f71.google.com with SMTP id a640c23a62f3a-a2336591d48so72624866b.3 for ; Fri, 05 Jan 2024 07:21:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704468116; x=1705072916; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lY3Wm0rqUAhsDJUxSGP7DuG2vuWegRTpE6t0VrqtHps=; b=YDeDMNX7vhnc+IdV7GaJKazm/gkEqfI/RcWEPWAM6XlUHewL+LsZ2/i1uLOknmUO5m bLvx31K1QYniWjALqC9kH50ZhaK3ioHWwjLplaRHYCDoLwHMMsQQv/6Jlc51Mi69SD6f R7ZVyv654nCVwzHaiVnMEj0M5rbrZPmOLcu/Agt2TAkuP1nRknwWgLjaS0UYMY2GU42k m/vmng+Gm6/dOhU7VnnBzizb7O1obxckgVjwlnyeUhC/ALdcfAVIySxirAl04GEzaRtz lkG3nOWLRmxZqEwUqoOXNukXYEBs+jXPWKTiYWIk/474hHOqYrlQsrtXDXZSmos/LqHQ 2hjA== X-Gm-Message-State: AOJu0Yw+XhD7ZyHvD2bXAZ/5kHU/jdxySFht0JsOXsGJ7BGf4NxUKmr/ arBYLV04jmEh0bFQTnjMaXikL88Y/2bP77284Bp+C2zsSmT+X11u3+J57Kp3vyvHD0uEYaM3b1x MV8khPfE4dn94L5I9aevTFiHXfkJZfkY8gss1h5aWU659xT4o X-Received: by 2002:a17:906:270b:b0:a28:e451:b023 with SMTP id z11-20020a170906270b00b00a28e451b023mr1093669ejc.145.1704468116335; Fri, 05 Jan 2024 07:21:56 -0800 (PST) X-Received: by 2002:a17:906:270b:b0:a28:e451:b023 with SMTP id z11-20020a170906270b00b00a28e451b023mr1093664ejc.145.1704468116100; Fri, 05 Jan 2024 07:21:56 -0800 (PST) Received: from amikhalitsyn.lan ([91.64.72.41]) by smtp.gmail.com with ESMTPSA id i23-20020a170906115700b00a298adde5a1sm345630eja.189.2024.01.05.07.21.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jan 2024 07:21:55 -0800 (PST) From: Alexander Mikhalitsyn To: mszeredi@redhat.com Cc: Alexander Mikhalitsyn , Miklos Szeredi , Amir Goldstein , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 2/3] fuse: use GFP_KERNEL_ACCOUNT for allocations in fuse_dev_alloc Date: Fri, 5 Jan 2024 16:21:28 +0100 Message-Id: <20240105152129.196824-3-aleksandr.mikhalitsyn@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240105152129.196824-1-aleksandr.mikhalitsyn@canonical.com> References: <20240105152129.196824-1-aleksandr.mikhalitsyn@canonical.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787264412600050375 X-GMAIL-MSGID: 1787264412600050375 fuse_dev_alloc() is called from the process context and it makes sense to properly account allocated memory to the kmemcg as these allocations are for long living objects. Cc: Miklos Szeredi Cc: Amir Goldstein Cc: Cc: Signed-off-by: Alexander Mikhalitsyn --- fs/fuse/inode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index 2a6d44f91729..b8636b5e79dc 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c @@ -1415,11 +1415,11 @@ struct fuse_dev *fuse_dev_alloc(void) struct fuse_dev *fud; struct list_head *pq; - fud = kzalloc(sizeof(struct fuse_dev), GFP_KERNEL); + fud = kzalloc(sizeof(struct fuse_dev), GFP_KERNEL_ACCOUNT); if (!fud) return NULL; - pq = kcalloc(FUSE_PQ_HASH_SIZE, sizeof(struct list_head), GFP_KERNEL); + pq = kcalloc(FUSE_PQ_HASH_SIZE, sizeof(struct list_head), GFP_KERNEL_ACCOUNT); if (!pq) { kfree(fud); return NULL; From patchwork Fri Jan 5 15:21:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandr Mikhalitsyn X-Patchwork-Id: 185431 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp6287793dyb; Fri, 5 Jan 2024 07:23:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IFBydBpvpReUd6utDp3yhF82nHcgAOFu3j7ynKRxTqaEyczgbIkelBKA1RTuho23+iIXiGI X-Received: by 2002:a17:907:924e:b0:a28:ac85:385b with SMTP id kb14-20020a170907924e00b00a28ac85385bmr742361ejb.110.1704468186352; Fri, 05 Jan 2024 07:23:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704468186; cv=none; d=google.com; s=arc-20160816; b=AKXGr76Tayy+cmOuo12Il78itlZVBFqQ5du5Xoh6C6JIrfhgsQMb9NSwj17KW5SzPp wjLlapzxYfthOgUJJe54QEU77lMbt17AbonlB8uYcPfmau96Sm66i40cBkMk15DMJGR0 Rw58JtKAKcTY3ZiiZp1qXSUFc8693/IxARXzcJ/2JCg4fbjrHcIbashpHWOkz569msVF yxPempweFYJKX6V3Y64UXN74Kz177ZzQbDdTbVRtKq6bkCYwJcBlOXvPvJ6vvfYtciij xM2tk0bW+s/J78yLcE0SOjuzoSUtOgJvbXsKPurtZVJBzY3yn6Up32vgkD2TY/TPuIs0 munw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=3ehRu/Zuzjv9SF1nMloRA0oZhzJAyfoaCoaYcJRfDMg=; fh=HYreRiIpRdi/Sn9y2jRKR/GOkeohfolaSlTMugsUjQY=; b=GtMSiO5MltRJLEAeIZrAaaOPPtzAx0kZZuLeURBbmTRy79RefZVaMRfml73Gwx9mqU HNUKzzmhausIWtByYc/rYuXneE8Sv/cR3rhZOrssm6pzE5IuQCrrjsMFsnENMSxbPpBg +che9bqXzv4zabpJng/n3NgNb2XZQIyCOdKRM8e4JrH4SmfGx9tOmCCTUvMa93EQFZiG 1d2KRxFPpQ1GKv2Y8EqvQceg8kZZgY3KXPERtFtyB2Cc8dArd5cZKlBB2HiEVXmSQbsH yeyn5PlCYF2gJGIDkBECKqQJEF6xKHwjdvu+ib04mlFushyry78Wm9+rSnH/MpFTOrLU No6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=UE8vaO1I; spf=pass (google.com: domain of linux-kernel+bounces-17991-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17991-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id t3-20020a17090605c300b00a27a2a029b3si652302ejt.419.2024.01.05.07.23.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jan 2024 07:23:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-17991-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=UE8vaO1I; spf=pass (google.com: domain of linux-kernel+bounces-17991-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17991-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id DFC8C1F22E1C for ; Fri, 5 Jan 2024 15:23:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A8D3B321B8; Fri, 5 Jan 2024 15:22:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=canonical.com header.i=@canonical.com header.b="UE8vaO1I" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A85083173E for ; Fri, 5 Jan 2024 15:22:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=canonical.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=canonical.com Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id F32EF3F468 for ; Fri, 5 Jan 2024 15:22:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1704468121; bh=3ehRu/Zuzjv9SF1nMloRA0oZhzJAyfoaCoaYcJRfDMg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=UE8vaO1Ix0h0HypNFxX3xnrcJENd2rJTrb8XVFzVrxiuDQKZqr/t6KO/eCv/49seL gD2zmqSJXsRDDZU5dbx9zVJRMD6mK6eNFBa5pUO5Q7Sx45Zle0TeF1RYRo3APFRe1P zXa2cX2I5tSw09U7ZSzhYj7xrUtYhxMT3l07dpcYBGTJIpU8xsqcScIp4OIDUr3+Tt lKKZf8OC2oWvw67tQsakjKfZwhBRC3Tq5HgOiKKMTZtsvQPLM9R5oCdCA/DlbhA0nQ knrq4Gn1MJSz6OeuagpPjszITc3XAJx1Xg7aDWr/UkAOwBT5tnWRFbbINfXLWwwXSD 51u4bgTrRtHCg== Received: by mail-ed1-f71.google.com with SMTP id 4fb4d7f45d1cf-556415459d2so983322a12.0 for ; Fri, 05 Jan 2024 07:22:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704468120; x=1705072920; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3ehRu/Zuzjv9SF1nMloRA0oZhzJAyfoaCoaYcJRfDMg=; b=d+VQYJlbbB2RJwOjLsUhFMQuVnb1SbX2yCc3QJcOkKJPHvqRaewlDLKRkCqyXosqKx LtzaiZijK9xm1T3qBP+s5zXUnM0iDvm/flD1Bci2ZS/G4KbOZn0oYag58xgWvrnfK6Y6 751pMxBLYT8axQjLRHFCXcP29y2npbDhPIb/+1LM28kWu4G6PueZNK8coLAK+Lh/0fXL p2rEoZF8areEeh/4DcxOaF27zkgy2eSltQ7VTjX+TjdwkyDIQ1mWTYFlSBMVMF/5S4Ku Onx4FWT0wUUGzMtMN9yen1RwBJhWJvRinAQvfiNWG4xHpfDDo+u5yTKO5i1lSVG6oGbM gu4Q== X-Gm-Message-State: AOJu0YwYyPNzaAf66U+e37KtXvq0UebwdfYvQ6FTuj1J27s8ONOSgIVG ZNhg1Y2wIiTo1RD628+TunA3gTn7DaY5IEXEwYpHPDMUmQUMNPBT2GeMCrnr1jS2Of3hNMgStw6 h1HuRKxkNv6/j515D2jz7oR1Wh9NC6XWPA5HEgA/jsz48nTxcR3x1Mpgy X-Received: by 2002:a17:906:e0d8:b0:a27:6e73:a248 with SMTP id gl24-20020a170906e0d800b00a276e73a248mr773799ejb.68.1704468120505; Fri, 05 Jan 2024 07:22:00 -0800 (PST) X-Received: by 2002:a17:906:e0d8:b0:a27:6e73:a248 with SMTP id gl24-20020a170906e0d800b00a276e73a248mr773791ejb.68.1704468120298; Fri, 05 Jan 2024 07:22:00 -0800 (PST) Received: from amikhalitsyn.lan ([91.64.72.41]) by smtp.gmail.com with ESMTPSA id i23-20020a170906115700b00a298adde5a1sm345630eja.189.2024.01.05.07.21.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jan 2024 07:21:59 -0800 (PST) From: Alexander Mikhalitsyn To: mszeredi@redhat.com Cc: Alexander Mikhalitsyn , Christian Brauner , Miklos Szeredi , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 3/3] fuse: __kuid_val/__kgid_val helpers in fuse_fill_attr_from_inode() Date: Fri, 5 Jan 2024 16:21:29 +0100 Message-Id: <20240105152129.196824-4-aleksandr.mikhalitsyn@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240105152129.196824-1-aleksandr.mikhalitsyn@canonical.com> References: <20240105152129.196824-1-aleksandr.mikhalitsyn@canonical.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787264433023592844 X-GMAIL-MSGID: 1787264433023592844 For the sake of consistency, let's use these helpers to extract {u,g}id_t values from k{u,g}id_t ones. There are no functional changes, just to make code cleaner. Cc: Christian Brauner Cc: Miklos Szeredi Cc: Cc: Signed-off-by: Alexander Mikhalitsyn Reviewed-by: Christian Brauner --- fs/fuse/inode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index b8636b5e79dc..ab824a8908b7 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c @@ -1489,8 +1489,8 @@ static void fuse_fill_attr_from_inode(struct fuse_attr *attr, .ctimensec = ctime.tv_nsec, .mode = fi->inode.i_mode, .nlink = fi->inode.i_nlink, - .uid = fi->inode.i_uid.val, - .gid = fi->inode.i_gid.val, + .uid = __kuid_val(fi->inode.i_uid), + .gid = __kgid_val(fi->inode.i_gid), .rdev = fi->inode.i_rdev, .blksize = 1u << fi->inode.i_blkbits, };