[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <A60A8436-AADD-46CA-9A62-261EE2DE0CB6@dilger.ca>
Date: Mon, 10 Sep 2018 18:29:24 -0600
From: Andreas Dilger <adilger@...ger.ca>
To: Wang Shilong <wangshilong1991@...il.com>
Cc: linux-ext4@...r.kernel.org, wshilong@....com
Subject: Re: [PATCH] ext4: fix to detect failure of dquot_initialize in
project ioctl
> On Sep 10, 2018, at 5:55 PM, Wang Shilong <wangshilong1991@...il.com> wrote:
>
> From: Wang Shilong <wshilong@....com>
>
> We return most of failure of dquota_initialize() except
> inode evict, this could make a bit sense, for example
> we allow file removal even quota files are broken?
>
> But it dosen't make sense to allow setting project
> if quota files etc are broken.
>
> Signed-off-by: Wang Shilong <wshilong@....com>
> ---
> This patch based on:
> https://patchwork.ozlabs.org/patch/967727/
> ---
> fs/ext4/ioctl.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c
> index 6ef989a..2f0bb90 100644
> --- a/fs/ext4/ioctl.c
> +++ b/fs/ext4/ioctl.c
> @@ -359,7 +359,9 @@ static int ext4_ioctl_setproject(struct file *filp, __u32 projid)
> brelse(iloc.bh);
> }
>
> - dquot_initialize(inode);
> + err = dquot_initialize(inode);
> + if (err)
> + return err;
(defect) this should use "goto out_unlock;" like the other error handling here.
Cheers, Andreas
Download attachment "signature.asc" of type "application/pgp-signature" (874 bytes)
Powered by blists - more mailing lists