mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jia Zhu <zhujia.zj@bytedance.com>
To: Jingbo Xu <jefflexu@linux.alibaba.com>,
	xiang@kernel.org, chao@kernel.org, huyue2@coolpad.com,
	linux-erofs@lists.ozlabs.org
Cc: yinxin.x@bytedance.com, linux-kernel@vger.kernel.org
Subject: Re: [External] [PATCH 1/2] erofs: put metabuf in error path in fscache mode
Date: Mon, 7 Nov 2022 22:41:57 +0800	[thread overview]
Message-ID: <b66ad97f-9d7e-0453-85e1-3b45ff14da6a@bytedance.com> (raw)
In-Reply-To: <20221104054028.52208-2-jefflexu@linux.alibaba.com>



在 2022/11/4 13:40, Jingbo Xu 写道:
> For tail packing layout, put metabuf when error is encountered.
> 
> Fixes: 1ae9470c3e14 ("erofs: clean up .read_folio() and .readahead() in fscache mode")
> Signed-off-by: Jingbo Xu <jefflexu@linux.alibaba.com>
Reviewed-by: Jia Zhu <zhujia.zj@bytedance.com>
> ---
>   fs/erofs/fscache.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/erofs/fscache.c b/fs/erofs/fscache.c
> index fe05bc51f9f2..83559008bfa8 100644
> --- a/fs/erofs/fscache.c
> +++ b/fs/erofs/fscache.c
> @@ -287,8 +287,10 @@ static int erofs_fscache_data_read(struct address_space *mapping,
>   			return PTR_ERR(src);
>   
>   		iov_iter_xarray(&iter, READ, &mapping->i_pages, pos, PAGE_SIZE);
> -		if (copy_to_iter(src + offset, size, &iter) != size)
> +		if (copy_to_iter(src + offset, size, &iter) != size) {
> +			erofs_put_metabuf(&buf);
>   			return -EFAULT;
> +		}
>   		iov_iter_zero(PAGE_SIZE - size, &iter);
>   		erofs_put_metabuf(&buf);
>   		return PAGE_SIZE;

  parent reply	other threads:[~2022-11-07 14:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-04  5:40 [PATCH 0/2] erofs: misc fixes for erofs " Jingbo Xu
2022-11-04  5:40 ` [PATCH 1/2] erofs: put metabuf in error path " Jingbo Xu
2022-11-04 10:03   ` Gao Xiang
2022-11-07 14:41   ` Jia Zhu [this message]
2022-11-08  3:07   ` Chao Yu
2022-11-04  5:40 ` [PATCH 2/2] erofs: get correct count for unmapped range " Jingbo Xu
2022-11-04 10:03   ` Gao Xiang
2022-11-08  3:09   ` Chao Yu

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=b66ad97f-9d7e-0453-85e1-3b45ff14da6a@bytedance.com \
    --to=zhujia.zj@bytedance.com \
    --cc=chao@kernel.org \
    --cc=huyue2@coolpad.com \
    --cc=jefflexu@linux.alibaba.com \
    --cc=linux-erofs@lists.ozlabs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xiang@kernel.org \
    --cc=yinxin.x@bytedance.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®