From: nikita Date: Tue, 20 Jun 2006 13:29:29 +0000 (+0000) Subject: ->loo_object_release() method is optional, mark it as such, and remove empty implemen... X-Git-Tag: v1_8_0_110~486^2~1598 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=7f33801b5cec08e475d7a0bfcadf00c53fb0ae53;p=fs%2Flustre-release.git ->loo_object_release() method is optional, mark it as such, and remove empty implementations --- diff --git a/lustre/cmm/mdc_object.c b/lustre/cmm/mdc_object.c index b62b124..3fc55b8 100644 --- a/lustre/cmm/mdc_object.c +++ b/lustre/cmm/mdc_object.c @@ -77,11 +77,6 @@ static int mdc_object_init(const struct lu_context *ctx, struct lu_object *lo) RETURN(0); } -static void mdc_object_release(const struct lu_context *ctx, - struct lu_object *lo) -{ -} - static int mdc_object_exists(const struct lu_context *ctx, struct lu_object *lo) { /* we don't know does it exists or not - but suppose that it does*/ @@ -96,7 +91,6 @@ static int mdc_object_print(const struct lu_context *ctx, static struct lu_object_operations mdc_obj_ops = { .loo_object_init = mdc_object_init, - .loo_object_release = mdc_object_release, .loo_object_free = mdc_object_free, .loo_object_print = mdc_object_print, .loo_object_exists = mdc_object_exists diff --git a/lustre/include/lu_object.h b/lustre/include/lu_object.h index 26d6eed..c96c5d1 100644 --- a/lustre/include/lu_object.h +++ b/lustre/include/lu_object.h @@ -173,7 +173,7 @@ struct lu_object_operations { /* * Called when last active reference to the object is released (and - * object returns to the cache). + * object returns to the cache). This method is optional. */ void (*loo_object_release)(const struct lu_context *ctx, struct lu_object *o); @@ -784,5 +784,4 @@ void lu_context_enter(struct lu_context *ctx); */ void lu_context_exit(struct lu_context *ctx); - #endif /* __LUSTRE_LU_OBJECT_H */ diff --git a/lustre/mdd/mdd_handler.c b/lustre/mdd/mdd_handler.c index 973959e..d8957d5 100644 --- a/lustre/mdd/mdd_handler.c +++ b/lustre/mdd/mdd_handler.c @@ -329,11 +329,6 @@ mdd_object_destroy(const struct lu_context *ctxt, struct md_object *obj) RETURN(rc); } -static void mdd_object_release(const struct lu_context *ctxt, - struct lu_object *o) -{ -} - static int mdd_object_print(const struct lu_context *ctxt, struct seq_file *f, const struct lu_object *o) { @@ -469,7 +464,6 @@ static struct lu_device_operations mdd_lu_ops = { static struct lu_object_operations mdd_lu_obj_ops = { .loo_object_init = mdd_object_init, - .loo_object_release = mdd_object_release, .loo_object_free = mdd_object_free, .loo_object_print = mdd_object_print, .loo_object_exists = mdd_object_exists, diff --git a/lustre/mdt/mdt_handler.c b/lustre/mdt/mdt_handler.c index e5aee15..ebc893a 100644 --- a/lustre/mdt/mdt_handler.c +++ b/lustre/mdt/mdt_handler.c @@ -1983,11 +1983,6 @@ static void mdt_object_free(const struct lu_context *ctxt, struct lu_object *o) EXIT; } -static void mdt_object_release(const struct lu_context *ctxt, - struct lu_object *o) -{ -} - static int mdt_object_exists(const struct lu_context *ctx, struct lu_object *o) { return lu_object_exists(ctx, lu_object_next(o)); @@ -2006,7 +2001,6 @@ static struct lu_device_operations mdt_lu_ops = { static struct lu_object_operations mdt_obj_ops = { .loo_object_init = mdt_object_init, - .loo_object_release = mdt_object_release, .loo_object_free = mdt_object_free, .loo_object_print = mdt_object_print, .loo_object_exists = mdt_object_exists