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

Tejun Heo
2007-07-13T05:03:23Z

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