Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2615291pxb; Sun, 17 Oct 2021 20:35:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmZNk37RlDRKGA2UM/HcnLCf60NuzLeP5JAi9vJLXcqVxuDlmpoQMX3cTYcvJMKhCuGYKL X-Received: by 2002:a17:90b:4b4d:: with SMTP id mi13mr29887900pjb.187.1634528116144; Sun, 17 Oct 2021 20:35:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634528116; cv=none; d=google.com; s=arc-20160816; b=ZdAN3XXzP9/N/yDDZmhkzArfvIuim3BsGSyPT5ik0+PHvlytMAIXqhndV2IUpv2Yk8 Ndnu9CaERfZrbELJs67ID8XAOz8n3OWcW+C8qAScU7b8CWfIZBUQE9/HmzCZqF9ExGLU /CWxPD4kj0aiFpmDNKBCCPEd5IrrfGkYDXPT+BravuWz9xMsPQL/ACwxQJs8o9Z5UG1h Qa9kTiPGT4mEPvwfqeMKC51jY1BMcBsSbiK+iGgAuPFUfVgcx/MlN9MVB1zBDQEFehER LBAOWy3k4ujkHz46kumVetllLc8rQfQ0uCVcygPHdPBad5EqzMQeU/xYueRrbb4R++oR BScw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=JE2ZEhnUZTL3zV3Jn9NvK7Qo/yNCMgF3TmpQvT7J8Zg=; b=vGMBMaMTLZs0VBwK72SSWl5F2OgF3DzEfO5TO562WFRULjrtkVGXE8FEthChR0C1g+ gSTcYEqamHdQXIU7T/h9kZHttkjEKicz8wobM44JfKaAtQ6nyPA3jsUKe8Yfjn63bF7s qeq7sXV78/DA0CydZGe/HHSz5YlJE2/kh4URn5jFmMQagR8pX/vazDFnArC/NjL8VtX7 0v28md8jzw/YtZuGdQiGuXqS69czOK1+fOYoagUqv2wOW2/h+eoItVLVZkgbWFiCW87k /0d9py0g2QjeBT/LB6AfTcgyOVk5P/QIpJ14reO9Ovi2eDV87t7xhWQmb9Egb7ez4gvm w+VA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="T/x9sy7/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bc12si6816890plb.31.2021.10.17.20.35.03; Sun, 17 Oct 2021 20:35:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="T/x9sy7/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237163AbhJPKoW (ORCPT + 98 others); Sat, 16 Oct 2021 06:44:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231240AbhJPKoV (ORCPT ); Sat, 16 Oct 2021 06:44:21 -0400 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15BD2C061570; Sat, 16 Oct 2021 03:42:13 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id r19so51971537lfe.10; Sat, 16 Oct 2021 03:42:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=JE2ZEhnUZTL3zV3Jn9NvK7Qo/yNCMgF3TmpQvT7J8Zg=; b=T/x9sy7/FO+PHLiFkOYn3cDMPoMa0Vv5EmeswMChUTYXoOPbERNuLBQzKvWguiu61W tf4BnfgZDeRMZ072LrHly+MoZ3O5GMk6uG6LJ10e4u/Pr+4nFQ+pdC3y524BDiIruMxG 1ixN6ZlvPtlxGDhv7Thb00oDFC4uzo3v3jvIqmxivov+J/agUsJrSVjgF09FmXwNkEr6 nNzj8pdKASz9xpqPfXsnC0iCJuginWVKQcDQPOXBzlLv+PDxllC946aaPOerjBRpHsXk JJqRST//jBeeiioEQ4ZbpF8SJEMo7QpXhS5xUtEB8bYq51oN1tvLatAOUKSvholtsu9w pPgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=JE2ZEhnUZTL3zV3Jn9NvK7Qo/yNCMgF3TmpQvT7J8Zg=; b=BoZf6n4YyuMHbf5KVKWdkJx2HwzjWMsY8tPdr++ck/lHMZgiksgAN6IQc1x8dSzLef d6DeQXbbx41iKxS18DTdiyqCLhzwXvCo7gR6pfjIVYgw5A062TsmsM/GSnyCNdByvaD7 cp5Yersgk57wTG+4HmWbBmjZ52wEjgn4X+SA4ZcMvWN3dTolheL08xVOW+5kYu25zgV+ M6c+DoezIOeirme/9VMDAtohzGlf4RJ2KosoZAuCf2ndgBxue5DwsxJ/QED9SQrv4SEx WNE1TAeCq1fjv0bLowkSMnDcKJBBIX9P3PoxDnkLJg+IJc7gZAV8/SV1GaY6c6B240kc OmAw== X-Gm-Message-State: AOAM5327hwGI+YVtu4gQb2nQBncKjegjdMTn8D97IS0vVgPYbcok+HVp oyOtl70m9G6OTpPV++7jeP60+ccUyl0= X-Received: by 2002:a05:6512:3b21:: with SMTP id f33mr16820364lfv.88.1634380931402; Sat, 16 Oct 2021 03:42:11 -0700 (PDT) Received: from kari-VirtualBox (85-23-89-224.bb.dnainternet.fi. [85.23.89.224]) by smtp.gmail.com with ESMTPSA id i8sm809164lfb.227.2021.10.16.03.42.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Oct 2021 03:42:10 -0700 (PDT) Date: Sat, 16 Oct 2021 13:42:09 +0300 From: Kari Argillander To: Konstantin Komarov Cc: ntfs3@lists.linux.dev, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH 1/2] fs/ntfs3: Remove unnecessary functions Message-ID: <20211016104209.r6mgz2ote4jcmgcj@kari-VirtualBox> References: <992eee8f-bed8-4019-a966-1988bd4dd5de@paragon-software.com> <2ce78ab6-453d-d7bf-9969-eb47b7347098@paragon-software.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2ce78ab6-453d-d7bf-9969-eb47b7347098@paragon-software.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 01, 2021 at 07:02:12PM +0300, Konstantin Komarov wrote: > We don't need ntfs_xattr_get_acl and ntfs_xattr_set_acl. > There are ntfs_get_acl_ex and ntfs_set_acl_ex. I just bisect this commit after tests "generic/099,generic/105,generic/307,generic/318,generic/319,generic/375,generic/444" fails for me. Fails happends because mount option acl was not defined. Before they where skipped, but now fail occurs. Also generic/099 was passing if acl mount option was defined, but after this patch it also fail. Every other test fail for me as well, but that is not related to this patch. So should we revert or do you make new patch to fix the issue or do you think we won't have any issue here? Argillander > Signed-off-by: Konstantin Komarov > --- > fs/ntfs3/xattr.c | 94 ------------------------------------------------ > 1 file changed, 94 deletions(-) > > diff --git a/fs/ntfs3/xattr.c b/fs/ntfs3/xattr.c > index 83bbee277e12..111355692163 100644 > --- a/fs/ntfs3/xattr.c > +++ b/fs/ntfs3/xattr.c > @@ -621,67 +621,6 @@ int ntfs_set_acl(struct user_namespace *mnt_userns, struct inode *inode, > return ntfs_set_acl_ex(mnt_userns, inode, acl, type, 0); > } > > -static int ntfs_xattr_get_acl(struct user_namespace *mnt_userns, > - struct inode *inode, int type, void *buffer, > - size_t size) > -{ > - struct posix_acl *acl; > - int err; > - > - if (!(inode->i_sb->s_flags & SB_POSIXACL)) { > - ntfs_inode_warn(inode, "add mount option \"acl\" to use acl"); > - return -EOPNOTSUPP; > - } > - > - acl = ntfs_get_acl(inode, type); > - if (IS_ERR(acl)) > - return PTR_ERR(acl); > - > - if (!acl) > - return -ENODATA; > - > - err = posix_acl_to_xattr(mnt_userns, acl, buffer, size); > - ntfs_posix_acl_release(acl); > - > - return err; > -} > - > -static int ntfs_xattr_set_acl(struct user_namespace *mnt_userns, > - struct inode *inode, int type, const void *value, > - size_t size) > -{ > - struct posix_acl *acl; > - int err; > - > - if (!(inode->i_sb->s_flags & SB_POSIXACL)) { > - ntfs_inode_warn(inode, "add mount option \"acl\" to use acl"); > - return -EOPNOTSUPP; > - } > - > - if (!inode_owner_or_capable(mnt_userns, inode)) > - return -EPERM; > - > - if (!value) { > - acl = NULL; > - } else { > - acl = posix_acl_from_xattr(mnt_userns, value, size); > - if (IS_ERR(acl)) > - return PTR_ERR(acl); > - > - if (acl) { > - err = posix_acl_valid(mnt_userns, acl); > - if (err) > - goto release_and_out; > - } > - } > - > - err = ntfs_set_acl(mnt_userns, inode, acl, type); > - > -release_and_out: > - ntfs_posix_acl_release(acl); > - return err; > -} > - > /* > * ntfs_init_acl - Initialize the ACLs of a new inode. > * > @@ -848,23 +787,6 @@ static int ntfs_getxattr(const struct xattr_handler *handler, struct dentry *de, > goto out; > } > > -#ifdef CONFIG_NTFS3_FS_POSIX_ACL > - if ((name_len == sizeof(XATTR_NAME_POSIX_ACL_ACCESS) - 1 && > - !memcmp(name, XATTR_NAME_POSIX_ACL_ACCESS, > - sizeof(XATTR_NAME_POSIX_ACL_ACCESS))) || > - (name_len == sizeof(XATTR_NAME_POSIX_ACL_DEFAULT) - 1 && > - !memcmp(name, XATTR_NAME_POSIX_ACL_DEFAULT, > - sizeof(XATTR_NAME_POSIX_ACL_DEFAULT)))) { > - /* TODO: init_user_ns? */ > - err = ntfs_xattr_get_acl( > - &init_user_ns, inode, > - name_len == sizeof(XATTR_NAME_POSIX_ACL_ACCESS) - 1 > - ? ACL_TYPE_ACCESS > - : ACL_TYPE_DEFAULT, > - buffer, size); > - goto out; > - } > -#endif > /* Deal with NTFS extended attribute. */ > err = ntfs_get_ea(inode, name, name_len, buffer, size, NULL); > > @@ -977,22 +899,6 @@ static noinline int ntfs_setxattr(const struct xattr_handler *handler, > goto out; > } > > -#ifdef CONFIG_NTFS3_FS_POSIX_ACL > - if ((name_len == sizeof(XATTR_NAME_POSIX_ACL_ACCESS) - 1 && > - !memcmp(name, XATTR_NAME_POSIX_ACL_ACCESS, > - sizeof(XATTR_NAME_POSIX_ACL_ACCESS))) || > - (name_len == sizeof(XATTR_NAME_POSIX_ACL_DEFAULT) - 1 && > - !memcmp(name, XATTR_NAME_POSIX_ACL_DEFAULT, > - sizeof(XATTR_NAME_POSIX_ACL_DEFAULT)))) { > - err = ntfs_xattr_set_acl( > - mnt_userns, inode, > - name_len == sizeof(XATTR_NAME_POSIX_ACL_ACCESS) - 1 > - ? ACL_TYPE_ACCESS > - : ACL_TYPE_DEFAULT, > - value, size); > - goto out; > - } > -#endif > /* Deal with NTFS extended attribute. */ > err = ntfs_set_ea(inode, name, name_len, value, size, flags, 0); > > -- > 2.33.0 >