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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux