Whamcloud - gitweb
LU-7813 lov: rename LOV_MAGIC_V*_DEF to *_DEFINED
[fs/lustre-release.git] / lustre / osc / osc_dev.c
index c340736..b95bdac 100644 (file)
  *
  * You should have received a copy of the GNU General Public License
  * version 2 along with this program; If not, see
- * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * http://www.gnu.org/licenses/gpl-2.0.html
  *
  * GPL HEADER END
  */
 
 /* class_name2obd() */
 #include <obd_class.h>
+#include <lustre_osc.h>
 
-#include "osc_cl_internal.h"
+#include "osc_internal.h"
 
-/** \addtogroup osc 
- * @{ 
+/** \addtogroup osc
+ * @{
  */
 
 struct kmem_cache *osc_lock_kmem;
@@ -92,19 +89,6 @@ struct lu_kmem_descr osc_caches[] = {
         }
 };
 
-struct lock_class_key osc_ast_guard_class;
-
-/*****************************************************************************
- *
- * Type conversions.
- *
- */
-
-static struct lu_device *osc2lu_dev(struct osc_device *osc)
-{
-        return &osc->od_cl.cd_lu_dev;
-}
-
 /*****************************************************************************
  *
  * Osc device and device type functions.
@@ -125,8 +109,10 @@ static void *osc_key_init(const struct lu_context *ctx,
 static void osc_key_fini(const struct lu_context *ctx,
                          struct lu_context_key *key, void *data)
 {
-        struct osc_thread_info *info = data;
-        OBD_SLAB_FREE_PTR(info, osc_thread_kmem);
+       struct osc_thread_info *info = data;
+
+       lu_buf_free(&info->oti_ladvise_buf);
+       OBD_SLAB_FREE_PTR(info, osc_thread_kmem);
 }
 
 struct lu_context_key osc_key = {