X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=lib%2Fkref.c;h=d3d227a08a4bdb79cae0b2f21be905451c607719;hb=2d75af2f2a7a6103a6d539a492fe81deacabde44;hp=6d19f690380b8e3020b3a74e8fac3d2713055d0e;hpb=274a24c16fa97a1fc67437b191274db2286c7ac3;p=deliverable%2Flinux.git diff --git a/lib/kref.c b/lib/kref.c index 6d19f690380b..d3d227a08a4b 100644 --- a/lib/kref.c +++ b/lib/kref.c @@ -15,24 +15,14 @@ #include #include -/** - * kref_set - initialize object and set refcount to requested number. - * @kref: object in question. - * @num: initial reference counter - */ -void kref_set(struct kref *kref, int num) -{ - atomic_set(&kref->refcount, num); - smp_mb(); -} - /** * kref_init - initialize object. * @kref: object in question. */ void kref_init(struct kref *kref) { - kref_set(kref, 1); + atomic_set(&kref->refcount, 1); + smp_mb(); } /** @@ -72,7 +62,6 @@ int kref_put(struct kref *kref, void (*release)(struct kref *kref)) return 0; } -EXPORT_SYMBOL(kref_set); EXPORT_SYMBOL(kref_init); EXPORT_SYMBOL(kref_get); EXPORT_SYMBOL(kref_put);