Linux-kernel mailing list archive 2000-26,: Re: owner field in `struct fs'

# Re: owner field in `struct fs'

Alexander Viro (viro@math.psu.edu)
Mon, 26 Jun 2000 11:58:27 -0400 (EDT)

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Philipp Rumpf: "Re: owner field in `struct fs'"
- Previous message: Tigran Aivazian: "Re: nr_files in linux-2.4.0-test2"

On Mon, 26 Jun 2000, David Woodhouse wrote:

> It's possible to have the module use count maintained from outside the
> driver without having the extra structure.
>
> Take a look at put_module_symbol() in kernel/module.c. It doesn't require
> any argument other than the address of the function, and it can find the
> module quite happily.

a) take a look at the ftape code.
b) so we have to play with reference counters upon every open()/release()
for regular files? Thank you very much. There we have control on
file_system_type and that's _much_ better.

> So it's theoretically possible to code up a get_module_symbol_byaddr()
> which does the converse, then for chrdev_open() et al to use that on
> whatever method of the fops is expected to be present in every case.

Eww... I would rather avoid requiring fields that would be "present in
every case"... And I suspect that file_operations doesn't have such a
field, anyway. <checking> Yup.

> While we're at it - can we get rid of MOD_INC_USE_COUNT and
> __MOD_INC_USE_COUNT altogether to force people to be aware of the need for
> try_inc_mod_count and checking its return value? First thing in 2.5 along
> with removing sleep_on() ?

Yes. Moreover, I hope that we can effectively get rid of them before 2.5.
Which is one of the reasons why I don't like keeping them all over the
place, especially if it involves schedule()-based solutions.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

- Next message: Philipp Rumpf: "Re: owner field in `struct fs'"
- Previous message: Tigran Aivazian: "Re: nr_files in linux-2.4.0-test2"