Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4463433ybi; Tue, 11 Jun 2019 07:06:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqwd3qoEb0p7uWK7V8D8gnSv5AZgl/f/q+K1/A9ekwcaTI4s4quVPiP5FrkqzeabiUXu+Dff X-Received: by 2002:a63:1723:: with SMTP id x35mr20327137pgl.233.1560261981112; Tue, 11 Jun 2019 07:06:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560261981; cv=none; d=google.com; s=arc-20160816; b=TXF2m36M1DAYrmmriMCrTAsI5BnP6kfdfxOwTy/GOynhZFm1kO1miY1DF2V+/xiEhd gxsCXgPvLBd0egYOJY/jXy5MmSzHWUUa8CwAyTdS5Q7xQ46bBWnpyXDaGQiHiB76O1Rd G4pIgKdY8xDQTCdc++216vbFfddMOesykY37Noxl0C+dmBE7/tZLn3oV0BS6ih5mrRdc cLjrnLzOvDiLlLrWhXMnP+L7EGBC1AFntt91F//OUvsSfdfOpS76E060AoVQbIEPF0Xl J5PGxyl1ZVFS0RN5r5UPROlM97aR4aawYxL33ELzUz88Sqi58SgsdoV764yjzA2zQXes 9qMA== 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:autocrypt:openpgp:from:references:cc:to:subject :dkim-signature; bh=NlP/8NoKwtwwPiK6Zh1fsHc3R+zGZgX5fbehxJ41bPs=; b=XEWVp3Q0zjIIU5AgUXm9m0r9BjvB9NHog8e8nvXPEIB/wKlG9IEHca7hTmc0YowFW2 lRGAkIUCRHji9/WHKtg7uv4y6KsQt66bG3S0SnbIoIn56chw/IuREeWOFMeALlp2rfBz Ll06YzbQCvbUbw1zsYp4MIVA4X/bkZuGjHZWmnOckvqerMqh/JXb8jRp9gqj5tYPf9cK Uwu8a2mvqNF1nShWMl2eSQCxTszmJsGxCeJS5BjN+eX19Akn4gaXo5lxya5EGXHFHp1J 38BCr7Akjtogsw7mv73ygZj9GarfOkel4ypLD3jXweqzAKgjDNNe7qCCnPV10W1MB+ac 97mQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=fO36X8sF; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d10si8521526pla.75.2019.06.11.07.06.05; Tue, 11 Jun 2019 07:06:21 -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; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=fO36X8sF; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390154AbfFKNmc (ORCPT + 99 others); Tue, 11 Jun 2019 09:42:32 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:56844 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387770AbfFKNmc (ORCPT ); Tue, 11 Jun 2019 09:42:32 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x5BDXuFW010141; Tue, 11 Jun 2019 13:41:25 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=NlP/8NoKwtwwPiK6Zh1fsHc3R+zGZgX5fbehxJ41bPs=; b=fO36X8sFP3+EfmjD1qFJI4e23MY2tyn5GrMGkga7jQZUJnO4m7H9+qnmLaCnOaQ+tDx0 mk3M2lRa9Cbj7kpmmQEY4qrPHAbzSOcu/BbnlYiMJ4X2ScIR5NAkP5jkYdVv2eMy2JaE KkaOyErzk5GvM1QvdRbE+eSZPIOfRXHWvwf9KTJ+aG/PVXlbkb6ebDLYndonGsER32rZ fpc2ufouW5kg849gr1iGvsmibnA0HUne/nwZrbkGeibheDzV4rF8bm5GpZOAIHPGZkuH xTczLsghU0CS0fvWWbzlw/loPzasCqJTTH3O+hPZU8mnKlG9HqwnJR6GqkXHrSdTfSJj 0Q== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2130.oracle.com with ESMTP id 2t04etn7yt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 11 Jun 2019 13:41:24 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x5BDfJow189988; Tue, 11 Jun 2019 13:41:24 GMT Received: from pps.reinject (localhost [127.0.0.1]) by userp3030.oracle.com with ESMTP id 2t024udh64-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 11 Jun 2019 13:41:24 +0000 Received: from userp3030.oracle.com (userp3030.oracle.com [127.0.0.1]) by pps.reinject (8.16.0.27/8.16.0.27) with SMTP id x5BDfOsq190063; Tue, 11 Jun 2019 13:41:24 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userp3030.oracle.com with ESMTP id 2t024udh5x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 11 Jun 2019 13:41:24 +0000 Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x5BDfF4f012930; Tue, 11 Jun 2019 13:41:15 GMT Received: from [192.168.1.84] (/99.156.91.244) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 11 Jun 2019 06:41:15 -0700 Subject: Re: [Jfs-discussion] [PATCH 1/4] vfs: create a generic checking function for FS_IOC_SETFLAGS To: "Darrick J. Wong" , matthew.garrett@nebula.com, yuchao0@huawei.com, tytso@mit.edu, shaggy@kernel.org, ard.biesheuvel@linaro.org, josef@toxicpanda.com, clm@fb.com, adilger.kernel@dilger.ca, jk@ozlabs.org, jack@suse.com, dsterba@suse.com, jaegeuk@kernel.org, viro@zeniv.linux.org.uk Cc: linux-xfs@vger.kernel.org, jfs-discussion@lists.sourceforge.net, linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, reiserfs-devel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, cluster-devel@redhat.com, linux-nilfs@vger.kernel.org, linux-mtd@lists.infradead.org, linux-btrfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, ocfs2-devel@oss.oracle.com References: <156022833285.3227089.11990489625041926920.stgit@magnolia> <156022834076.3227089.14763553158562888103.stgit@magnolia> From: Dave Kleikamp Openpgp: preference=signencrypt Autocrypt: addr=dave.kleikamp@oracle.com; prefer-encrypt=mutual; keydata= mQINBE7VCEMBEAC3kywrdIxxL/I9maTCxaWTBiHZFNhT5K8QZGLUfW3uFrW89PdAtloSEc1W ScC9O+D2Ygqwx46ZVA7qMXHxpNQ6IZp8he88gQ9lilWD8OJ/T3OKyT6ITdkmsgv6G08QdGCP 0+mCpETv79kcj+Z4pzKLN5QyKW40R3LGcJ6a+0AG5As5/ZkmhceSffdSyDS6zKff3c6cgfQH zl+ugygdKItr3UGIfxuzF3b9uYicsVStwIxyuyzY8i1yYYnnXZtWkI9ZwxT+00PqjCvfVioy xswoscukLQntlkfd4gwM8t56RIxqEo4iNmFwmBYHlSd7C+8S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kgsKyeOiuaVNEv3tmPCMAY/v oMAsCTLK63Wsd9pUY2SGt2ACIy7pTq+k1b09cqlTM2vux8/R0HNzQBXNcFiKKz+JNVObP30N /hsLs0+Ko9f/2OcixfkGjdih8I+FnRdS6wAO7k6g+tTBOj/sbSbH+eZbxWwANkiFkykOASGA /4RzIDie72NiM8lKzpyrlaruSFxuj9/wZuCT7jaYIaiOMPy7Y0Lpisy/hRhwDCNlKU6Hcr7k hQ1cIx4CB40fwqjbK61tWrqZR47pDKShl5DBRdeX/1a+WHXzDLVE4sfax5xL2wjiCUfEyH7x 9YJoKXbnOlKuzjsm9lZIwVwqw07Qi1uFmzJopHW0H3P6zUlujM0buDmaio+Q8znJchizOrQ3 58pn7BNKx3mmswoyZlDtukab9QGF7BZBMjwmafn1RuEVGdlSB52F8TShLgKUM+0dkFmI2yf/ rnNNL3zBkwD3nWcTxFnX Message-ID: Date: Tue, 11 Jun 2019 08:41:06 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <156022834076.3227089.14763553158562888103.stgit@magnolia> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9284 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906110093 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On 6/10/19 11:45 PM, Darrick J. Wong wrote: > From: Darrick J. Wong > > Create a generic checking function for the incoming FS_IOC_SETFLAGS flag > values so that we can standardize the implementations that follow ext4's > flag values. > > Signed-off-by: Darrick J. Wong -- clip -- > diff --git a/fs/jfs/ioctl.c b/fs/jfs/ioctl.c > index ba34dae8bd9f..c8446d2cd0c7 100644 > --- a/fs/jfs/ioctl.c > +++ b/fs/jfs/ioctl.c > @@ -98,6 +98,12 @@ long jfs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) > /* Lock against other parallel changes of flags */ > inode_lock(inode); > > + oldflags = jfs_map_ext2(jfs_inode->mode2 & JFS_FL_USER_VISIBLE, > + 0); > + err = vfs_ioc_setflags_check(inode, oldflags, flags); > + if (err) > + goto setflags_out; inode_unlock(inode) is not called on the error path. > + > oldflags = jfs_inode->mode2; > > /* This patch leaves jfs's open-coded version of the same check. Thanks, Shaggy