Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp6304452ybf; Thu, 5 Mar 2020 17:43:05 -0800 (PST) X-Google-Smtp-Source: ADFU+vswzPGnQ2aJLvSEReVXNp75MtP9rg+6jAm5C8p0kSzUZ3qSyjzjyI6+QRCyFXY+z35JWh9R X-Received: by 2002:a05:6808:b29:: with SMTP id t9mr961363oij.64.1583458985054; Thu, 05 Mar 2020 17:43:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583458985; cv=none; d=google.com; s=arc-20160816; b=Z3CwxTNVwWBNX45oqdvqDmcYfELLiTIHN+DhXXRnHrgF237pWS6Ux6j6lgHILIeTNE Ae3yByb9YOhab8eTK6bPvhXQbqbDoimpY4OgUTZC2F8qfq8nI6RtC8kI9Xl2iTQAww0E UTTrF3+cNQmxBJTY7H+dwt9qKCrL4jkV7Y/mr6JQZ5GWh+EbvUbd3/mJF4jWYsiSaXNu 4e0WR638latDxmuOxwKWv2stW3mtJLpPS2toLDeViKv/8+F/QE/4wMoUdncKNOCPtjtJ I5za2xSdLOWIsfRmeyxFIyQUc4nJgjdMNFt1Du0kT1dL8yA8lYrB4pl68uKRL/Ao5ONP 66OA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=SO8SF0fRs4gm9zjgJ5npIDJ8ex1hHPJ1UNzxdktCWGU=; b=HcR2dL2ndFQmzQWpWD3UQkkCV1EA9eX3gq4ESbexoV5B2YvIHj3CgEvLh0LqNpEN8N QattT1gySTB/+FO+aq01FSFTsrYWWC592VFC6nk9TF7KuBZi5+BzXFUMnNJ28TtJ3FGg hjOu5dBKuihG6BCpuI/ns4aKxyDy7QVHau9ucEtzGISTjPExVbsOY8LS92ZU18OfalsD 9huv6d0U2IHoj1nt6SDLYlJrQYJmvP3i3aehJaSUx8fptWQ9SYz6auBPCRtiisiNo7CJ GAVVy6qEZPrY/e2I1AmtY5LOzAZRD80Ork8hX5evPLZWiipV6n0CiN6oj5vdl/nMCSzl WPxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=c1Lcx9EL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x20si437992oic.75.2020.03.05.17.42.52; Thu, 05 Mar 2020 17:43:05 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=c1Lcx9EL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726271AbgCFBmX (ORCPT + 99 others); Thu, 5 Mar 2020 20:42:23 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:46410 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726162AbgCFBmX (ORCPT ); Thu, 5 Mar 2020 20:42:23 -0500 Received: by mail-lj1-f194.google.com with SMTP id h18so431289ljl.13 for ; Thu, 05 Mar 2020 17:42:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=SO8SF0fRs4gm9zjgJ5npIDJ8ex1hHPJ1UNzxdktCWGU=; b=c1Lcx9ELcG0+k4Gd2AIRBYtY97tISFMaQp+9h1vDWLH6UoUJdJVvRhM0Fgp9B/8M7S PtTrzdPy44SWe6ROZIUTTrUxAzx694ibOZI6peNisdwdQJjVE20d09XZXTutZNkPX8nq i6QBe0/sN7nTyD6PhtFlo1XTgFSI6J0Us3GRPAu9HC+rcfjVbdOqQPDsqg48Oa1AkwxJ VfZv/EavO1Pqtfks3zXKvFxYEXZBk4Pedp4cks+Gm9xqlmB/TbLbLMH6wmPf8vs8SMhA AUNQaGF04ysOAnF8y9II99At1Mo8v8Qpara6YzgpxdmjDNdyEdQoVyDewS59z21y7Psy w8Ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=SO8SF0fRs4gm9zjgJ5npIDJ8ex1hHPJ1UNzxdktCWGU=; b=QL6FZ7FJUFudj9CWYYgRt0w8iJfvKCfdsCeJJCNXrlJFmktEiDcCvtZ4xjItIpu+c/ 8GN/vU3nCutgGTmAmgjTAVys5E9cbfASf4QoCUXF2nWoOIffyT+rN+NfyJqU8N5abN6Z bDp3a0wljcuNO7yIkIOIofNAhjMD700NO6mM7CeZLXGrb2c/1jhvTjS3L9La0+Rxvkae VEACZpezNrI3ch7OND60xApiGpoO9zx30UONQeLiX4Ny14RhuGPIuKfjD8FFvx5cTEHh C3r05lQwmleCdcJ7giotswjWfOkcrxxADASTmRIJT+tl6rAtEBeUUNcQwMGQ0X4VvWLn WqCQ== X-Gm-Message-State: ANhLgQ0CM+WlBjNdeFdJw3wnMoZKqojNjJ0Ww/++vVa8NRmJ3czkX/xP W4CrEalI1HzTXAHudXaJKaOffbHLmeRVP9794VKZQL3BHC8= X-Received: by 2002:a2e:9918:: with SMTP id v24mr525320lji.197.1583458941188; Thu, 05 Mar 2020 17:42:21 -0800 (PST) MIME-Version: 1.0 References: <20200305234822.178708-1-jaegeuk@kernel.org> In-Reply-To: <20200305234822.178708-1-jaegeuk@kernel.org> From: Daniel Rosenberg Date: Thu, 5 Mar 2020 17:42:09 -0800 Message-ID: Subject: Re: [PATCH] f2fs: fix wrong check on F2FS_IOC_FSSETXATTR To: Jaegeuk Kim Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 5, 2020 at 3:48 PM Jaegeuk Kim wrote: > > This fixes the incorrect failure when enabling project quota on casefold-enabled > file. > > Cc: Daniel Rosenberg > Signed-off-by: Jaegeuk Kim > --- This fixes the issue I was seeing, I'm just a bit concerned with the last two. > > fi->i_flags = iflags | (fi->i_flags & ~mask); > - f2fs_bug_on(F2FS_I_SB(inode), (fi->i_flags & F2FS_COMPR_FL) && > - (fi->i_flags & F2FS_NOCOMP_FL)); > + f2fs_bug_on(F2FS_I_SB(inode), (masked_flags & F2FS_COMPR_FL) && > + (masked_flags & F2FS_NOCOMP_FL)); > > - if (fi->i_flags & F2FS_PROJINHERIT_FL) > + if (masked_flags & F2FS_PROJINHERIT_FL) > set_inode_flag(inode, FI_PROJ_INHERIT); > else > clear_inode_flag(inode, FI_PROJ_INHERIT); > -- > 2.25.1.481.gfbce0eb801-goog > Shouldn't these still be fi->i_flags? masked_flags comes from the previously set i_flags, so this would change from testing the new combination that was just set for fi->i_flags to checking only the masked version of the old flags. It might make it clearer to rename masked_flags to masked_old_flags, or something like that. -Daniel