Linux-ext4 Archive on lore.kernel.org
 help / color / Atom feed
From: Miao Xie <miaoxie@huawei.com>
To: Dan Carpenter <dan.carpenter@oracle.com>, Theodore Ts'o <tytso@mit.edu>
Cc: Andreas Dilger <adilger.kernel@dilger.ca>,
	<linux-ext4@vger.kernel.org>, <kernel-janitors@vger.kernel.org>
Subject: Re: [PATCH] ext4: unlock on error in ext4_expand_extra_isize()
Date: Mon, 16 Dec 2019 17:22:17 +0800
Message-ID: <5b8569d5-9fbe-0bcf-8fcc-852ded7cd672@huawei.com> (raw)
In-Reply-To: <20191213185010.6k7yl2tck3wlsdkt@kili.mountain>

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@oracle.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;
>  }
> 

      parent reply index

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-02  9:41 [bug report] ext4, project: expand inode extra size if possible Dan Carpenter
2019-12-13 11:32 ` Jan Kara
2019-12-13 18:50   ` [PATCH] ext4: unlock on error in ext4_expand_extra_isize() Dan Carpenter
2019-12-14 22:32     ` Theodore Y. Ts'o
2019-12-16  9:22     ` Miao Xie [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5b8569d5-9fbe-0bcf-8fcc-852ded7cd672@huawei.com \
    --to=miaoxie@huawei.com \
    --cc=adilger.kernel@dilger.ca \
    --cc=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-ext4 Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-ext4/0 linux-ext4/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-ext4 linux-ext4/ https://lore.kernel.org/linux-ext4 \
		linux-ext4@vger.kernel.org
	public-inbox-index linux-ext4

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-ext4


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git