Whamcloud - gitweb
->loo_object_release() method is optional, mark it as such, and remove empty implemen...
authornikita <nikita>
Tue, 20 Jun 2006 13:29:29 +0000 (13:29 +0000)
committernikita <nikita>
Tue, 20 Jun 2006 13:29:29 +0000 (13:29 +0000)
lustre/cmm/mdc_object.c
lustre/include/lu_object.h
lustre/mdd/mdd_handler.c
lustre/mdt/mdt_handler.c

index b62b124..3fc55b8 100644 (file)
@@ -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
index 26d6eed..c96c5d1 100644 (file)
@@ -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 */
index 973959e..d8957d5 100644 (file)
@@ -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,
index e5aee15..ebc893a 100644 (file)
@@ -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