Re: [BK PATCH] devfs cleanups for 2.5.29

Richard Gooch
2002-08-21T03:56:57Z

Roman Zippel writes:
> Hi,
>
> On Tue, 20 Aug 2002, Richard Gooch wrote:
>
> > > So where again is the module count
> > > incremented?
> >
> > Which kernel tree are you looking at? I'm looking at 2.4.20-pre4.
>
> Try 2.5.x.

Ah, that explains why we seemed to be talking past each other. For
2.4.x, def_blk_fops.open() will bump the reference count, but in 2.5.x
it won't. So in 2.5.x, fs/devfs/base.c:devfs_open() shouldn't drop the
refcount after def_blk_fops.open() returns.

> > > You never answered my question, why you insist on managing the ops
> > > pointer. The far easier fix would be to simply remove this nonsense.
> >
> > Because it's an optimsation, avoiding the need for looking up ops from
> > tables/lists. It's the sensible way of doing it. I've explained this
> > to others on the list, and in the FAQ. I'm not going to keep going
> > over it again and again.
>
> Optimization??? This would require any device had to be be opened
> _only_ through devfs, you are not seriously suggesting that???

Huh? Of course not! All I'm saying is that if you use devfs, the
optimisation will short-circuit the lookups.

Regards,

Richard....
Permanent: rgooch@atnf.csiro.au
Current: rgooch@ras.ucalgary.ca