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

2007-07-13 Thread Tejun Heo
Hello, Satyam Sharma wrote: > Anyway, we've wasted enough time and bandwidth discussing this > (relatively trivial) matter, and I know nobody's mind is changed after > the end of it all (at least mine won't), so I suggest let's stop. The > proposed change is in Greg's tree already, and if he's fin

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

2007-07-13 Thread Satyam Sharma
Hi Tejun, On 7/14/07, Tejun Heo <[EMAIL PROTECTED]> wrote: Hello, Satyam Sharma wrote: > The whole _purpose_ of get()/put() functions (i.e. refcounting in general) > is to ensure that the (shared) objects don't go away from under us while > we're holding them. The proposed change _weakens_ the

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

2007-07-13 Thread Tejun Heo
Hello, Satyam Sharma wrote: >> Because mixed situation is undisputably worse than one way or the other >> && making sysfs_put() to conform to its surroundings is the shortest >> path to achieve uniformity. Gees, what's so important about allowing or >> not allowing NULL? > > The whole _purpose_

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

2007-07-13 Thread Satyam Sharma
Hi, Thanks for explaining the purpose behind the proposed change, but I'm still not convinced that allowing NULL argument in _put() is a good idea, however: On 7/13/07, Tejun Heo <[EMAIL PROTECTED]> wrote: Satyam Sharma wrote: > Please, this is _basic_ refcounting semantics. For those who disag

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

2007-07-12 Thread Tejun Heo
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 flagg

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

2007-07-12 Thread Tejun Heo
Hello, Satyam Sharma wrote: > Yoshifuji is 100% correct, IMNSHO. > > Please, this is _basic_ refcounting semantics. For those who disagree, > kindly read Yoshifuji's above paragraph again. I did but I don't really see anything so basic about refcounting semantics there. >> Well, I'm okay either

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

2007-07-12 Thread Satyam Sharma
Hi, Make sysfs_put() ignore NULL sd instead of oopsing. >>> I do not think this is a good idea; it is non-sense (and rather a bug) >>> to call "put" with NULL argument in general. >> It's better than having to check it all the time in the caller :) > > How many callers do we have that will

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

2007-07-11 Thread Tejun Heo
YOSHIFUJI Hideaki / 吉藤英明 wrote: > In article <[EMAIL PROTECTED]> (at Wed, 11 Jul 2007 16:55:29 -0700), Greg KH > <[EMAIL PROTECTED]> says: > >> On Thu, Jul 12, 2007 at 08:50:47AM +0900, YOSHIFUJI Hideaki / ?$B5HF#1QL@ >> wrote: >>> In article <[EMAIL PROTECTED]> (at Wed, 11 Jul 2007 16:31:43 -07

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

2007-07-11 Thread YOSHIFUJI Hideaki / 吉藤英明
In article <[EMAIL PROTECTED]> (at Wed, 11 Jul 2007 16:55:29 -0700), Greg KH <[EMAIL PROTECTED]> says: > On Thu, Jul 12, 2007 at 08:50:47AM +0900, YOSHIFUJI Hideaki / ?$B5HF#1QL@ > wrote: > > In article <[EMAIL PROTECTED]> (at Wed, 11 Jul 2007 16:31:43 -0700), Greg > > Kroah-Hartman <[EMAIL PRO

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

2007-07-11 Thread Greg KH
On Thu, Jul 12, 2007 at 08:50:47AM +0900, YOSHIFUJI Hideaki / ?$B5HF#1QL@ wrote: > In article <[EMAIL PROTECTED]> (at Wed, 11 Jul 2007 16:31:43 -0700), Greg > Kroah-Hartman <[EMAIL PROTECTED]> says: > > > Make sysfs_put() ignore NULL sd instead of oopsing. > > I do not think this is a good idea;

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

2007-07-11 Thread YOSHIFUJI Hideaki / 吉藤英明
In article <[EMAIL PROTECTED]> (at Wed, 11 Jul 2007 16:31:43 -0700), Greg Kroah-Hartman <[EMAIL PROTECTED]> says: > Make sysfs_put() ignore NULL sd instead of oopsing. I do not think this is a good idea; it is non-sense (and rather a bug) to call "put" with NULL argument in general. --yoshfuji

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

2007-07-11 Thread Greg Kroah-Hartman
From: Tejun Heo <[EMAIL PROTECTED]> Make sysfs_put() ignore NULL sd instead of oopsing. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]> --- fs/sysfs/sysfs.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/sysfs/sysfs