Re: [PATCH 24/61] sysfs: make sysfs_put() ignore NULL sd

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

 



Hello, forgot one thing.

Tejun Heo wrote:
>> I can't believe it should be so difficult to understand this. How can any
>> caller (that first did a xxx_get() on that shared object) land up with that
>> object getting NULL _from under it_ unless some logic is wrong
>> somewhere? And instead of flagging this broken logic, the proposed
>> change here would hide it.

I agree with you about get().  Allowing NULL argument doesn't really
help anything.  It only increases the chance of getting things wrong.
I'm all for not allowing NULL argument to get().  For put(), as I wrote
before, I think allowing NULL has some advantages and I don't care
either way as long as it's not confusing.  The 'not confusing' part is
way more important to me than advantages of either way.

-- 
tejun
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux