Re: [PATCH v3 10/13] exfat: add nls operations

From: Markus Elfring
Date: Tue Nov 19 2019 - 10:06:39 EST


â
> +++ 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