Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp992128lqt; Tue, 19 Mar 2024 09:35:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX/xVSpuCVqrvSI7ayVauKbxhf6eEPTQ3cqW1da/RFlojyEA9f6NWRuw+qaMEGYsjwjLZ8H0HrWlPsydWhlaFMQgWfAS24q09I/XkvhdA== X-Google-Smtp-Source: AGHT+IENVx/RnpUXkoNnFdNkYGwAWOPa5QIcz76kBP/bF148LRwn3EfUkfd4hJwKQR0RCI/LG9tj X-Received: by 2002:a05:6a00:4f83:b0:6e7:3d44:92d0 with SMTP id ld3-20020a056a004f8300b006e73d4492d0mr3673049pfb.15.1710866112122; Tue, 19 Mar 2024 09:35:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710866112; cv=pass; d=google.com; s=arc-20160816; b=KPg/6MM5dGqjs+mUJwRqrfutPnpCwaVwLVEKBEpJBV2fo3cQ2U39vKJFod478J4ZOI D9KLqT+k8GzcyizLd7b1o94r+Xx/Weer9BTrdevCQf8bOjnbRLyTTdQL2n9KHKu91pWh TyAV+8N8K1rgSFGLndgzUTUVbYu5dfwgvsr7uumoP4aDsSbOiXtZkQsV6Nbxfm/zq0wx BBkgmK8ehO77AdBHl/ljMYrbZ1jP8EerRWlZu7QmBjA+BfjTM+Ps1LUGjQnLUG/UxunV cQL7oZMoGJeuUgdEOVwtgTJPkf9CTubdb1bO1i0LXee+ZbLh7hvbM+vdt8G7SGyKaIGV 8amw== ARC-Message-Signature: i=2; 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; bh=qdzjjTNuNXZkBl/lmYuX5O1xFTALOPIXvpzJ3SHWCy8=; fh=k/ntoYyfhVXlJ6dO7vhvqOSVlhGJ2dvIyOJFv53VJIU=; b=D+utAHpNjq0ef2t9An1yE8hPO3pY1NAOuQzL/le0KY+iFXSvk0aHjzCk1GflewFIMm IIXst0Rf+reyWIETEn+TSXxAvaCVG7JzjviRClDPz7aFtUEtzQMvCR2eYUwQ0OGiQziF 3g74uRv9fsoGKgjtgd80FpniEube5nqMdpZVNdUdggdna/8pBaGuBBDtekMW73eBdZv2 Wxeo1cMKoLXy/mmBS0zNwTbvTkfWHNci+xo89sAD8kvRRf/gbKmA2Z/sWfpJJ4nPsvPe LmqGofmzOlixiBdgCrNcNVs8FLex3IzSSU7pXWxvlyFPtp9l4Sc3yPx/7kOvxkXfKPor QiPw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-107845-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-107845-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id e18-20020aa79812000000b006e6c736da26si11224868pfl.79.2024.03.19.09.35.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Mar 2024 09:35:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-107845-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-107845-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-107845-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id C9987283757 for ; Tue, 19 Mar 2024 16:35:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E1ABB848E; Tue, 19 Mar 2024 16:34:59 +0000 (UTC) Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) (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 AD970111A1 for ; Tue, 19 Mar 2024 16:34:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.255 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710866099; cv=none; b=jwNXvcJzyLx+5ClCXL9P2ifV3nivl+FOm8E3l0DEmMVU52fteqnyVOl5hgVzp068L6mcDkvtnw73/ClzLtJe1e4jd1xja8Bek/CBTxtT/xvkYVkjVNIV1RWRDGd/6zDE/xcA9O7hcQGvxEGqZOJbbEuGAcSp0zZX9xYl6dt66G0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710866099; c=relaxed/simple; bh=0/4QRrWBcVmnwDDUbZA1MxL5kl40PY4/kO7kvJvx2JE=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=rlHPJgw4YE7VkQE63KBJsbvASgIU/k49jhMfm3/+OoDpY3QIoeOHqSmBmmhIGvgEhmvTnCl9iY/H9gSRMYicKhS4dVscermz63fyEcOOYGbMLz1XFKXLVKcvIOGOBb5n6dMgNJplHR1lbNL7uiY0o0jtnPIeF5rHOTDO8nr8Fpc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.255 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.163.174]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4TzcHj1RB5z1Q9nB; Wed, 20 Mar 2024 00:14:41 +0800 (CST) Received: from kwepemd500012.china.huawei.com (unknown [7.221.188.25]) by mail.maildlp.com (Postfix) with ESMTPS id 3AC8A14040D; Wed, 20 Mar 2024 00:16:56 +0800 (CST) Received: from huawei.com (10.90.53.73) by kwepemd500012.china.huawei.com (7.221.188.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.28; Wed, 20 Mar 2024 00:16:55 +0800 From: Li Zetao To: , CC: , , Subject: [RFC PATCH 3/5] ubifs: Support accessing ACLs through inode_operations Date: Wed, 20 Mar 2024 00:16:44 +0800 Message-ID: <20240319161646.2153867-4-lizetao1@huawei.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240319161646.2153867-1-lizetao1@huawei.com> References: <20240319161646.2153867-1-lizetao1@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To kwepemd500012.china.huawei.com (7.221.188.25) Register the get/set interfaces to the inode operations whilch allows access to the ACL through the vfs layer. Signed-off-by: Li Zetao --- fs/ubifs/dir.c | 2 ++ fs/ubifs/file.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/fs/ubifs/dir.c b/fs/ubifs/dir.c index dfb6823cc953..59784349ba21 100644 --- a/fs/ubifs/dir.c +++ b/fs/ubifs/dir.c @@ -1724,6 +1724,8 @@ const struct inode_operations ubifs_dir_inode_operations = { .setattr = ubifs_setattr, .getattr = ubifs_getattr, .listxattr = ubifs_listxattr, + .get_inode_acl = ubifs_get_inode_acl, + .set_acl = ubifs_set_acl, .update_time = ubifs_update_time, .tmpfile = ubifs_tmpfile, .fileattr_get = ubifs_fileattr_get, diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c index 8f964f8b0f96..80def8734b13 100644 --- a/fs/ubifs/file.c +++ b/fs/ubifs/file.c @@ -1665,6 +1665,8 @@ const struct inode_operations ubifs_file_inode_operations = { .setattr = ubifs_setattr, .getattr = ubifs_getattr, .listxattr = ubifs_listxattr, + .get_inode_acl = ubifs_get_inode_acl, + .set_acl = ubifs_set_acl, .update_time = ubifs_update_time, .fileattr_get = ubifs_fileattr_get, .fileattr_set = ubifs_fileattr_set, -- 2.34.1