mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Zhang Yi <yi.zhang@huawei.com>
To: Kemeng Shi <shikemeng@huaweicloud.com>
Cc: <linux-ext4@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<tytso@mit.edu>, <jack@suse.com>
Subject: Re: [PATCH 3/6] jbd2: remove unused return value of do_readahead
Date: Wed, 8 Jan 2025 10:46:05 +0800	[thread overview]
Message-ID: <ed2fa122-4907-4463-a38c-3544ffd00440@huawei.com> (raw)
In-Reply-To: <20241224202707.1530558-4-shikemeng@huaweicloud.com>

On 2024/12/25 4:27, Kemeng Shi wrote:
> Remove unused return value of do_readahead.
> 
> Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>

Looks good to me.

Reviewed-by: Zhang Yi <yi.zhang@huawei.com>

> ---
>  fs/jbd2/recovery.c | 11 +++--------
>  1 file changed, 3 insertions(+), 8 deletions(-)
> 
> diff --git a/fs/jbd2/recovery.c b/fs/jbd2/recovery.c
> index 9192be7c19d8..a671f8ee7dd2 100644
> --- a/fs/jbd2/recovery.c
> +++ b/fs/jbd2/recovery.c
> @@ -65,9 +65,8 @@ static void journal_brelse_array(struct buffer_head *b[], int n)
>   */
>  
>  #define MAXBUF 8
> -static int do_readahead(journal_t *journal, unsigned int start)
> +static void do_readahead(journal_t *journal, unsigned int start)
>  {
> -	int err;
>  	unsigned int max, nbufs, next;
>  	unsigned long long blocknr;
>  	struct buffer_head *bh;
> @@ -85,7 +84,7 @@ static int do_readahead(journal_t *journal, unsigned int start)
>  	nbufs = 0;
>  
>  	for (next = start; next < max; next++) {
> -		err = jbd2_journal_bmap(journal, next, &blocknr);
> +		int err = jbd2_journal_bmap(journal, next, &blocknr);
>  
>  		if (err) {
>  			printk(KERN_ERR "JBD2: bad block at offset %u\n",
> @@ -94,10 +93,8 @@ static int do_readahead(journal_t *journal, unsigned int start)
>  		}
>  
>  		bh = __getblk(journal->j_dev, blocknr, journal->j_blocksize);
> -		if (!bh) {
> -			err = -ENOMEM;
> +		if (!bh)
>  			goto failed;
> -		}
>  
>  		if (!buffer_uptodate(bh) && !buffer_locked(bh)) {
>  			bufs[nbufs++] = bh;
> @@ -112,12 +109,10 @@ static int do_readahead(journal_t *journal, unsigned int start)
>  
>  	if (nbufs)
>  		bh_readahead_batch(nbufs, bufs, 0);
> -	err = 0;
>  
>  failed:
>  	if (nbufs)
>  		journal_brelse_array(bufs, nbufs);
> -	return err;
>  }
>  
>  #endif /* __KERNEL__ */


  parent reply	other threads:[~2025-01-08  2:46 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-24 20:27 [PATCH 0/6] Minor cleanups to jbd2 Kemeng Shi
2024-12-24 20:27 ` [PATCH 1/6] jbd2: remove unused h_jdata flag of handle Kemeng Shi
2025-01-03 14:35   ` Jan Kara
2025-01-08  2:39   ` Zhang Yi
2024-12-24 20:27 ` [PATCH 2/6] jbd2: remove unused return value of jbd2_journal_cancel_revoke Kemeng Shi
2025-01-03 14:37   ` Jan Kara
2025-01-08  2:43   ` Zhang Yi
2024-12-24 20:27 ` [PATCH 3/6] jbd2: remove unused return value of do_readahead Kemeng Shi
2025-01-03 14:39   ` Jan Kara
2025-01-08  2:46   ` Zhang Yi [this message]
2024-12-24 20:27 ` [PATCH 4/6] jbd2: remove stale comment of update_t_max_wait Kemeng Shi
2025-01-03 14:39   ` Jan Kara
2025-01-08  3:12   ` Zhang Yi
2024-12-24 20:27 ` [PATCH 5/6] jbd2: correct stale function name in comment Kemeng Shi
2025-01-03 14:36   ` Jan Kara
2025-01-08  3:22   ` Zhang Yi
2024-12-24 20:27 ` [PATCH 6/6] jbd2: Correct stale comment of release_buffer_page Kemeng Shi
2025-01-03 14:44   ` Jan Kara
2025-01-08  3:27   ` Zhang Yi

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=ed2fa122-4907-4463-a38c-3544ffd00440@huawei.com \
    --to=yi.zhang@huawei.com \
    --cc=jack@suse.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shikemeng@huaweicloud.com \
    --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
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®