Re: [PATCH 4/8] ublk: simplify ublk_ch_open and ublk_ch_release

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

 



On Thu, Jul 21, 2022 at 07:16:28AM +0200, Christoph Hellwig wrote:
> fops->open and fops->release are always paired.  Use simple atomic bit
> ops ot indicate if the device is opened instead of a count that can
> only be 0 and 1 and a useless cmpxchg loop in ublk_ch_release.
> 
> Also don't bother clearing file->private_data is the file is about to
> be freed anyway.
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>
> ---

Reviewed-by: Ming Lei <ming.lei@xxxxxxxxxx>

-- 
Ming




[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