Re: [PATCH RFC] try_module_get usage

2007-07-11 Thread Rusty Russell
On Wed, 2007-07-11 at 16:55 +0900, Fernando Luis Vázquez Cao wrote: > I keep seeing uses of try_module_get(THIS_MODULE) which seem to mimic > the behavior of the former MOD_INC_USE_COUNT. The UBI driver is one > example: > > int ubi_get_device_info(int ubi_num, struct ubi_device_info *di) > { >

Re: [PATCH RFC] try_module_get usage

2007-07-11 Thread Artem Bityutskiy
On Wed, 2007-07-11 at 10:41 +0100, Christoph Hellwig wrote: > On Wed, Jul 11, 2007 at 04:55:31PM +0900, Fernando Luis V?zquez Cao > wrote: > > I keep seeing uses of try_module_get(THIS_MODULE) which seem to > mimic > > the behavior of the former MOD_INC_USE_COUNT. The UBI driver is one > > example:

Re: [PATCH RFC] try_module_get usage

2007-07-11 Thread Christoph Hellwig
On Wed, Jul 11, 2007 at 04:55:31PM +0900, Fernando Luis V?zquez Cao wrote: > I keep seeing uses of try_module_get(THIS_MODULE) which seem to mimic > the behavior of the former MOD_INC_USE_COUNT. The UBI driver is one > example: It's of course buggy as hell. But UBI folks prefer not to listen to a

[PATCH RFC] try_module_get usage

2007-07-11 Thread Fernando Luis Vázquez Cao
I keep seeing uses of try_module_get(THIS_MODULE) which seem to mimic the behavior of the former MOD_INC_USE_COUNT. The UBI driver is one example: int ubi_get_device_info(int ubi_num, struct ubi_device_info *di) { const struct ubi_device *ubi; if (!try_module_get(THIS_MODULE))