Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp7111580ybi; Thu, 13 Jun 2019 09:44:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqwlan2xqYzWTogrC5Fv/pKZE7YHUiPqsQXy4nDdCCC8Lvs1NIsPcLPKEa/5yckY97B2F2JN X-Received: by 2002:a63:2159:: with SMTP id s25mr29550219pgm.234.1560444296742; Thu, 13 Jun 2019 09:44:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560444296; cv=none; d=google.com; s=arc-20160816; b=JQxr5AFJBW6jzaH7U6D1Dz9VTNqi6/bAjlSffzpqWGdkQ1cVor7dLaSkj7zIGyOmxj YYnMHuCUC0s6I7yXw9LR/1/3KG+GbLXa6eEdCvviHeVkrzRPQzlI+TkhZa7bQ24Tt5l0 LyMap0CqDL+2sHO9/yctv0CKm0hH1TgBD6D0J7GWLVPuEegcxgJcHVol55kXFKuKl3yj wbEwAowv1kEt0Lbnfiuyqg+7cvsGPFTbCL2bY+FI6w05qJ+/vP8+WB6dx/LvIvRyh8ye +jgvnm/knWvIvoEZ63REAnPEaOx8OfsGg1X6OYOayve616/Ho5UGalIFTaDqJeqVNBw8 GSUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=toWxvNBGIZaylSW9S2dc4ZotjdvtCWaL+4KGqBzUWBE=; b=iJFUFP+z6RjCRrwjnWdhkASFIptcZXJoCOz+MypmnOpeQU9AGkM+T8ZJ+G/V/G4WsA fPTDdat7YPDz2vyg99+iRVL15av0x16FaRcplzCrCJMrbEL/JPTJ9GFMcNDe551N5FPM xkrVVfwj4bdcNUja9QLq38YyXasfTqQEb5tV54NFLV4jWXHOvJNkQPg7fwKQPV+qdGNC bZ+4RV1gHaZIO18nig8Z56eTFD6Y7HA8HvI6gVfuqIqmSR+4fnGJycUQVVVs0FzonWIn ShTnnoc7rNzTQLcQ9KA5kZ8Pb4Y9upd/MICz5R9FeUcket4a7fqwyMsUm0gCmN4NqW0D 5F0Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j9si63256pgp.328.2019.06.13.09.44.41; Thu, 13 Jun 2019 09:44:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730468AbfFMQna (ORCPT + 99 others); Thu, 13 Jun 2019 12:43:30 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:18561 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730463AbfFMGgZ (ORCPT ); Thu, 13 Jun 2019 02:36:25 -0400 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 73DA9B6D9CABCE71E365; Thu, 13 Jun 2019 14:36:23 +0800 (CST) Received: from [10.134.22.195] (10.134.22.195) by smtp.huawei.com (10.3.19.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 13 Jun 2019 14:36:22 +0800 Subject: Re: [PATCH 2/2] f2fs: only set project inherit bit for directory To: Wang Shilong , , CC: Wang Shilong , Andreas Dilger References: <1559795545-17290-1-git-send-email-wshilong1991@gmail.com> <1559795545-17290-2-git-send-email-wshilong1991@gmail.com> From: Chao Yu Message-ID: <73fb9e88-d3f5-9420-d6d8-82ff4354e4d6@huawei.com> Date: Thu, 13 Jun 2019 14:36:21 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <1559795545-17290-2-git-send-email-wshilong1991@gmail.com> Content-Type: text/plain; charset="windows-1252" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.134.22.195] X-CFilter-Loop: Reflected Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On 2019/6/6 12:32, Wang Shilong wrote: > From: Wang Shilong > > It doesn't make any sense to have project inherit bits > for regular files, even though this won't cause any > problem, but it is better fix this. > > Cc: Andreas Dilger > Signed-off-by: Wang Shilong > --- > fs/f2fs/f2fs.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h > index 06b89a9862ab..f02ebecb68ea 100644 > --- a/fs/f2fs/f2fs.h > +++ b/fs/f2fs/f2fs.h > @@ -2370,7 +2370,8 @@ static inline void f2fs_change_bit(unsigned int nr, char *addr) > F2FS_PROJINHERIT_FL) > > /* Flags that are appropriate for regular files (all but dir-specific ones). */ > -#define F2FS_REG_FLMASK (~(F2FS_DIRSYNC_FL | F2FS_TOPDIR_FL)) > +#define F2FS_REG_FLMASK (~(F2FS_DIRSYNC_FL | F2FS_TOPDIR_FL |\ > + F2FS_PROJINHERIT_FL)) Hi Shilong, Could you please add below diff as ext4 did? diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index efdafa886510..295ca5ed42d9 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -1759,6 +1759,9 @@ static int f2fs_ioc_getflags(struct file *filp, unsigned long arg) fsflags &= F2FS_GETTABLE_FS_FL; + if (S_ISREG(inode->i_mode)) + fsflags &= ~FS_PROJINHERIT_FL; + return put_user(fsflags, (int __user *)arg); } Thanks, > > /* Flags that are appropriate for non-directories/regular files. */ > #define F2FS_OTHER_FLMASK (F2FS_NODUMP_FL | F2FS_NOATIME_FL) >