[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <705cb02b-7707-af52-c2b5-70660debc619@web.de>
Date: Tue, 19 Nov 2019 16:06:17 +0100
From: Markus Elfring <Markus.Elfring@....de>
To: Namjae Jeon <namjae.jeon@...sung.com>,
linux-fsdevel@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
Christoph Hellwig <hch@....de>,
Daniel Wagner <dwagner@...e.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Sungjong Seo <sj1557.seo@...sung.com>,
Valdis Klētnieks <valdis.kletnieks@...edu>,
linkinjeon@...il.com
Subject: Re: [PATCH v3 10/13] exfat: add nls operations
…
> +++ b/fs/exfat/nls.c
…
> +static int exfat_load_upcase_table(struct super_block *sb,
> + sector_t sector, unsigned long long num_sectors,
> + unsigned int utbl_checksum)
> +{
…
> +error:
> + if (bh)
> + brelse(bh);
I am informed in the way that this function tolerates the passing
of null pointers.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/buffer_head.h?id=af42d3466bdc8f39806b26f593604fdc54140bcb#n292
https://elixir.bootlin.com/linux/v5.4-rc8/source/include/linux/buffer_head.h#L292
Thus I suggest to omit the extra pointer check also at similar places.
Can the label “release_bh” be more helpful?
Regards,
Markus
Powered by blists - more mailing lists