mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chao Yu <yuchao0@huawei.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>, <jaegeuk@kernel.org>
Cc: <linux-f2fs-devel@lists.sourceforge.net>,
	<linux-kernel@vger.kernel.org>, <kernel-janitors@vger.kernel.org>
Subject: Re: [PATCH] f2fs: Fix a return value in case of error in 'f2fs_fill_super'
Date: Mon, 12 Jun 2017 19:03:17 +0800	[thread overview]
Message-ID: <da6d6381-42e4-a99d-89e4-3cba1d628091@huawei.com> (raw)
In-Reply-To: <20170611072111.2293-1-christophe.jaillet@wanadoo.fr>

On 2017/6/11 15:21, Christophe JAILLET wrote:
> err must be set to -ENOMEM, otherwise we return 0.
> 
> Fixes: a912b54d3aaa0 ("f2fs: split bio cache")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

Reviewed-by: Chao Yu <yuchao0@huawei.com>

Thanks,

> ---
>  fs/f2fs/super.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
> index 5be27eacea99..38f1624ac5dc 100644
> --- a/fs/f2fs/super.c
> +++ b/fs/f2fs/super.c
> @@ -1976,8 +1976,10 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent)
>  
>  		sbi->write_io[i] = kmalloc(n * sizeof(struct f2fs_bio_info),
>  								GFP_KERNEL);
> -		if (!sbi->write_io[i])
> +		if (!sbi->write_io[i]) {
> +			err = -ENOMEM;
>  			goto free_options;
> +		}
>  
>  		for (j = HOT; j < n; j++) {
>  			init_rwsem(&sbi->write_io[i][j].io_rwsem);
> 

      reply	other threads:[~2017-06-12 10:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-11  7:21 Christophe JAILLET
2017-06-12 11:03 ` Chao Yu [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=da6d6381-42e4-a99d-89e4-3cba1d628091@huawei.com \
    --to=yuchao0@huawei.com \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=jaegeuk@kernel.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    /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®