From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Theodore Y. Ts'o" Subject: Re: [PATCH v3 1/3] ext4: fix setattr project check upon fssetxattr ioctl Date: Sat, 15 Sep 2018 23:55:29 -0400 Message-ID: <20180916035529.GG8652@thunk.org> References: <1536710238-16858-1-git-send-email-wshilong1991@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1g1O9t-0005aZ-Mp for linux-f2fs-devel@lists.sourceforge.net; Sun, 16 Sep 2018 03:55:41 +0000 Received: from imap.thunk.org ([74.207.234.97]) by sfi-mx-4.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) id 1g1O9r-0000YG-9t for linux-f2fs-devel@lists.sourceforge.net; Sun, 16 Sep 2018 03:55:41 +0000 Content-Disposition: inline In-Reply-To: <1536710238-16858-1-git-send-email-wshilong1991@gmail.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net To: Wang Shilong Cc: adilger@dilger.ca, linux-ext4@vger.kernel.org, wshilong@ddn.com, dchinner@redhat.com, linux-f2fs-devel@lists.sourceforge.net On Wed, Sep 12, 2018 at 08:57:16AM +0900, Wang Shilong wrote: > diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c > index a7074115d6f6..f81102bd3203 100644 > --- a/fs/ext4/ioctl.c > +++ b/fs/ext4/ioctl.c > @@ -339,19 +339,14 @@ static int ext4_ioctl_setproject(struct file *filp, __u32 projid) > if (projid_eq(kprojid, EXT4_I(inode)->i_projid)) > return 0; > > - err = mnt_want_write_file(filp); > - if (err) > - return err; > - A huge part of this patch is dropping the calls to mnt_want_write_file() and mnt_drop_write_file(). What's the justification for doing this? The use of mnt_want_write_file() looks necessary to me... - Ted