mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Kemeng Shi <shikemeng@huaweicloud.com>,
	linux-ext4@vger.kernel.org,
	Andreas Dilger <adilger.kernel@dilger.ca>,
	Theodore Ts'o <tytso@mit.edu>
Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 1/6] ext4: add missing brelse for bh2 in ext4_dx_add_entry
Date: Fri, 20 Dec 2024 14:15:40 +0100	[thread overview]
Message-ID: <2474b3df-1e58-49f5-a3b3-6cfd6e57372d@web.de> (raw)
In-Reply-To: <20241219110027.1440876-2-shikemeng@huaweicloud.com>

> Add missing brelse for bh2 in ext4_dx_add_entry.

* I propose to append parentheses to function names.

* How do you think about to add any tags (like “Fixes” and “Cc”) accordingly?
  https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.13-rc3#n145> +++ b/fs/ext4/namei.c
> @@ -2580,8 +2580,10 @@ static int ext4_dx_add_entry(handle_t *handle, struct ext4_filename *fname,
>  		BUFFER_TRACE(frame->bh, "get_write_access");
>  		err = ext4_journal_get_write_access(handle, sb, frame->bh,
>  						    EXT4_JTR_NONE);
> -		if (err)
> +		if (err) {
> +			brelse(bh2);
>  			goto journal_error;
> +		}
>  		if (!add_level) {
…

I suggest to add another jump target instead so that a bit of exception handling
can be better reused at the end of this function implementation.

Regards,
Markus

  parent reply	other threads:[~2024-12-20 13:20 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-19 11:00 [PATCH 0/6] Fix and cleanups to ext4 namei.c Kemeng Shi
2024-12-19 11:00 ` [PATCH 1/6] ext4: add missing brelse for bh2 in ext4_dx_add_entry Kemeng Shi
2024-12-20 12:57   ` Ojaswin Mujoo
2024-12-20 13:15   ` Markus Elfring [this message]
2024-12-24 12:11     ` Kemeng Shi
2024-12-21  7:33   ` Zhang Yi
2024-12-19 11:00 ` [PATCH 2/6] ext4: remove unneeded bits mask in dx_get_block() Kemeng Shi
2024-12-20  1:10   ` Andreas Dilger
2024-12-24 12:09     ` Kemeng Shi
2024-12-19 11:00 ` [PATCH 3/6] ext4: remove unneeded forward declaration in namei.c Kemeng Shi
2024-12-20 12:55   ` Ojaswin Mujoo
2024-12-21  7:34   ` Zhang Yi
2024-12-19 11:00 ` [PATCH 4/6] ext4: remove unneeded check in get_dx_countlimit Kemeng Shi
2024-12-20 12:51   ` Ojaswin Mujoo
2024-12-24 12:10     ` Kemeng Shi
2024-12-21  7:44   ` Zhang Yi
2024-12-24 12:16     ` Kemeng Shi
2024-12-19 11:00 ` [PATCH 5/6] ext4: remove unused input "inode" in ext4_find_dest_de Kemeng Shi
2024-12-21  7:45   ` Zhang Yi
2024-12-19 11:00 ` [PATCH 6/6] ext4: calculate rec_len of ".." with correct name length 2 Kemeng Shi
2024-12-20 13:52   ` Markus Elfring
2024-12-20 20:38     ` Andreas Dilger
2024-12-24 12:15       ` Kemeng Shi

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=2474b3df-1e58-49f5-a3b3-6cfd6e57372d@web.de \
    --to=markus.elfring@web.de \
    --cc=adilger.kernel@dilger.ca \
    --cc=kernel-janitors@vger.kernel.org \
    --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®