| Age | Commit message (Collapse) | Author |
|
Makes it possible to optimize batched multiple unrefs.
Initial user will be drivers/gpu/ttm which accumulates unrefs to be
processed outside of atomic code.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
Of the three uses of kref_set in the kernel:
One really should be kref_put as the code is letting go of a
reference,
Two really should be kref_init because the kref is being
initialised.
This suggests that making kref_set available encourages bad code.
So fix the three uses and remove kref_set completely.
Signed-off-by: NeilBrown <neilb@suse.de>
Acked-by: Mimi Zohar <zohar@us.ibm.com>
Acked-by: Serge Hallyn <serue@us.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
|
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
|
|
* remove asm/atomic.h inclusion from kref.h -- not needed, linux/types.h
is enough for atomic_t
* remove linux/kref.h inclusion from files which do not need it.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
|
Remove the "#ifdef __KERNEL__" tests from unexported header files in
linux/include whose entire contents are wrapped in that preprocessor
test.
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
|
This adds kref_set() to the kref api for future use by people who really
know what they are doing with krefs...
From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
|
This is needed for the upcoming klist code from Pat.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
|
Both work, but the latter can cause warnings in user space
from compilers that don't like using undefined identifiers
in preprocessor expressions (quite reasonable).
Pointed out by Randy Dunlap.
|
|
Both gcc and sparse will speed up tokenization by noticing
when a header file is protected by the standard preprocessor
#ifndef .. #endif exclusion.
However, that requires that the headers actually _use_ that
standard exclusion. Some did their own little broken dance.
|
|
Thanks to Kiran for bugging me to do this.
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
|
|
This was based on a patch from Kiran, but tweaked further by me.
Signed-off-by: Ravikiran Thirumalai <kiran@in.ibm.com>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
|
|
Based on the kobject structure, but much smaller and simpler to use.
|