Re: [PATCH -next] drbd: Use helper put_drbd_dev() and get_drbd_dev()

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

 



On 8/8/23 3:01 AM, Ruan Jinjie wrote:
> The drbd_destroy_device() arg of this code is already duplicated
> 18 times, use helper function put_drbd_dev() to release drbd_device
> and related resources instead of open coding it to help improve
> code readability a bit.
> 
> And add get_drbd_dev() helper function to be symmetrical with it.
> 
> No functional change involved.

IMHO this just makes the code harder to read. You're not adding a
helper, all it does is call the same get/put parts. Why not just keep
it as-is then?

-- 
Jens Axboe





[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux