[Top][All Lists]

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

Re: [PATCH 08/10] scsi/scsi_bus: Add scsi_device_get

From: Paolo Bonzini
Subject: Re: [PATCH 08/10] scsi/scsi_bus: Add scsi_device_get
Date: Wed, 30 Sep 2020 19:46:32 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0

On 30/09/20 16:32, Maxim Levitsky wrote:
>>      Compared to Maxim's patch, I am avoiding the extra argument
>>      to do_scsi_device_find by moving the RCU_READ_LOCK_GUARD()
>>      out of do_scsi_device_find itself.
> Which is a good idea, although my mindset was like, I got a device,
> lets just grab a ref to it before it disappears and then do
> whatever I want.

Understood, but "I got a device, I know I'm under RCU so it can't
disappear" is more efficient and just as common.  This also explains the
difference in patch 7.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]