[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5b8569d5-9fbe-0bcf-8fcc-852ded7cd672@huawei.com>
Date: Mon, 16 Dec 2019 17:22:17 +0800
From: Miao Xie <miaoxie@...wei.com>
To: Dan Carpenter <dan.carpenter@...cle.com>,
Theodore Ts'o <tytso@....edu>
CC: Andreas Dilger <adilger.kernel@...ger.ca>,
<linux-ext4@...r.kernel.org>, <kernel-janitors@...r.kernel.org>
Subject: Re: [PATCH] ext4: unlock on error in ext4_expand_extra_isize()
Hi, Dan Carpenter
I forgot to reply your mail because I'm busy recently. Sorry.
Thanks for your fix.
Regards
Miao
on 2019/12/14 at 2:50, Dan Carpenter wrote:
> We need to unlock the xattr before returning on this error path.
>
> Fixes: c03b45b853f5 ("ext4, project: expand inode extra size if possible")
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
> ---
> fs/ext4/inode.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
> index 28f28de0c1b6..629a25d999f0 100644
> --- a/fs/ext4/inode.c
> +++ b/fs/ext4/inode.c
> @@ -5692,7 +5692,7 @@ int ext4_expand_extra_isize(struct inode *inode,
> error = ext4_journal_get_write_access(handle, iloc->bh);
> if (error) {
> brelse(iloc->bh);
> - goto out_stop;
> + goto out_unlock;
> }
>
> error = __ext4_expand_extra_isize(inode, new_extra_isize, iloc,
> @@ -5702,8 +5702,8 @@ int ext4_expand_extra_isize(struct inode *inode,
> if (!error)
> error = rc;
>
> +out_unlock:
> ext4_write_unlock_xattr(inode, &no_expand);
> -out_stop:
> ext4_journal_stop(handle);
> return error;
> }
>
Powered by blists - more mailing lists