Re: [PATCH 3/2] [RFC] target: make target_put_sess_cmd void

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

 



On Fri, May 11, 2012 at 7:38 AM, Jörn Engel <joern@xxxxxxxxx> wrote:
> It clearly doesn't make any sense to check the return value of kref_put.

I'm not sure this follows.  I haven't thought deeply about the code in
question, but using the return value of kref_put() can be OK.

As Documentation/kref.txt says:

"... The kref_put() return value is useful if you do not want to hold the
lock during the whole release operation..."

and indeed it is valid to check to know that you are dropping the last
reference and want to do something once no one has a reference
to the object.

 - R.
--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux