Whamcloud - gitweb
Branch:HEAD
[fs/lustre-release.git] / lustre / include / lustre_capa.h
index 7f65a44..44a06b7 100644 (file)
@@ -192,7 +192,7 @@ static inline struct obd_capa *alloc_capa(int site)
         if (unlikely(site != CAPA_SITE_CLIENT && site != CAPA_SITE_SERVER))
                 return ERR_PTR(-EINVAL);
 
-        OBD_SLAB_ALLOC(ocapa, capa_cachep, GFP_KERNEL, sizeof(*ocapa));
+        OBD_SLAB_ALLOC_PTR(ocapa, capa_cachep);
         if (unlikely(!ocapa))
                 return ERR_PTR(-ENOMEM);
 
@@ -284,22 +284,6 @@ static inline int capa_opc_supported(struct lustre_capa *capa, __u64 opc)
         return (capa_opc(capa) & opc) == opc;
 }
 
-static inline struct lustre_capa *
-lustre_unpack_capa(struct lustre_msg *msg, unsigned int offset)
-{
-        struct lustre_capa *capa;
-
-        capa = lustre_swab_buf(msg, offset, sizeof(*capa),
-                               lustre_swab_lustre_capa);
-        if (capa == NULL)
-                CERROR("bufcount %u, bufsize %u\n",
-                       lustre_msg_bufcount(msg),
-                       (lustre_msg_bufcount(msg) <= offset) ?
-                                -1 : lustre_msg_buflen(msg, offset));
-
-        return capa;
-}
-
 struct filter_capa_key {
         struct list_head        k_list;
         struct lustre_capa_key  k_key;