staging: lustre: lnet: change lnet_me_t to proper structure
authorJames Simmons <jsimmons@infradead.org>
Mon, 27 Feb 2017 00:41:34 +0000 (19:41 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Mar 2017 08:17:04 +0000 (09:17 +0100)
Change lnet_me_t from typedef to proper structure.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-on: https://review.whamcloud.com/20831
Reviewed-by: Olaf Weber <olaf@sgi.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/include/linux/lnet/lib-lnet.h
drivers/staging/lustre/include/linux/lnet/lib-types.h
drivers/staging/lustre/lnet/lnet/lib-md.c
drivers/staging/lustre/lnet/lnet/lib-me.c
drivers/staging/lustre/lnet/lnet/lib-ptl.c

index 9e33d0a714b4fac9ec50735c7d500e8bbf75bc16..a82bb3ca015a7ed2ff6bc4f37bef1f327876dbb8 100644 (file)
@@ -233,17 +233,17 @@ lnet_md_free(lnet_libmd_t *md)
        LIBCFS_FREE(md, size);
 }
 
-static inline lnet_me_t *
+static inline struct lnet_me *
 lnet_me_alloc(void)
 {
-       lnet_me_t *me;
+       struct lnet_me *me;
 
        LIBCFS_ALLOC(me, sizeof(*me));
        return me;
 }
 
 static inline void
-lnet_me_free(lnet_me_t *me)
+lnet_me_free(struct lnet_me *me)
 {
        LIBCFS_FREE(me, sizeof(*me));
 }
@@ -342,12 +342,12 @@ lnet_wire_handle2md(struct lnet_handle_wire *wh)
 }
 
 static inline void
-lnet_me2handle(struct lnet_handle_me *handle, lnet_me_t *me)
+lnet_me2handle(struct lnet_handle_me *handle, struct lnet_me *me)
 {
        handle->cookie = me->me_lh.lh_cookie;
 }
 
-static inline lnet_me_t *
+static inline struct lnet_me *
 lnet_handle2me(struct lnet_handle_me *handle)
 {
        /* ALWAYS called with resource lock held */
@@ -360,7 +360,7 @@ lnet_handle2me(struct lnet_handle_me *handle)
        if (!lh)
                return NULL;
 
-       return lh_entry(lh, lnet_me_t, me_lh);
+       return lh_entry(lh, struct lnet_me, me_lh);
 }
 
 static inline void
@@ -542,9 +542,9 @@ int lnet_mt_match_md(struct lnet_match_table *mtable,
                     struct lnet_match_info *info, struct lnet_msg *msg);
 
 /* portals match/attach functions */
-void lnet_ptl_attach_md(lnet_me_t *me, lnet_libmd_t *md,
+void lnet_ptl_attach_md(struct lnet_me *me, lnet_libmd_t *md,
                        struct list_head *matches, struct list_head *drops);
-void lnet_ptl_detach_md(lnet_me_t *me, lnet_libmd_t *md);
+void lnet_ptl_detach_md(struct lnet_me *me, lnet_libmd_t *md);
 int lnet_ptl_match_md(struct lnet_match_info *info, struct lnet_msg *msg);
 
 /* initialized and finalize portals */
@@ -623,7 +623,7 @@ void lnet_copy_kiov2iter(struct iov_iter *to,
                         unsigned int nkiov, const lnet_kiov_t *kiov,
                         unsigned int kiovoffset, unsigned int nob);
 
-void lnet_me_unlink(lnet_me_t *me);
+void lnet_me_unlink(struct lnet_me *me);
 
 void lnet_md_unlink(lnet_libmd_t *md);
 void lnet_md_deconstruct(lnet_libmd_t *lmd, lnet_md_t *umd);
index 19e01ccd753523ce572feb8c5986e0fafd8f08fb..3384860f1c9c73b388ef00b3d80211856f748887 100644 (file)
@@ -127,7 +127,7 @@ struct lnet_eq {
        int                     **eq_refs;      /* percpt refcount for EQ */
 };
 
-typedef struct lnet_me {
+struct lnet_me {
        struct list_head         me_list;
        struct lnet_libhandle    me_lh;
        lnet_process_id_t        me_match_id;
@@ -137,12 +137,12 @@ typedef struct lnet_me {
        __u64                    me_ignore_bits;
        lnet_unlink_t            me_unlink;
        struct lnet_libmd       *me_md;
-} lnet_me_t;
+};
 
 typedef struct lnet_libmd {
        struct list_head         md_list;
        struct lnet_libhandle    md_lh;
-       lnet_me_t               *md_me;
+       struct lnet_me          *md_me;
        char                    *md_start;
        unsigned int             md_offset;
        unsigned int             md_length;
index 4f2700eae55494d6410525cd05ede39366f5cca5..dd3cdda291b7fb75f4557704521039fd854e2bbc 100644 (file)
@@ -44,7 +44,7 @@ lnet_md_unlink(lnet_libmd_t *md)
 {
        if (!(md->md_flags & LNET_MD_FLAG_ZOMBIE)) {
                /* first unlink attempt... */
-               lnet_me_t *me = md->md_me;
+               struct lnet_me *me = md->md_me;
 
                md->md_flags |= LNET_MD_FLAG_ZOMBIE;
 
index 0ea64f6e4272e69ce0c63e9e1c1b4b108795cb39..20cc8f850af9d814a75dec3e73573bad3b4f1c0e 100644 (file)
@@ -222,7 +222,7 @@ EXPORT_SYMBOL(LNetMEInsert);
 int
 LNetMEUnlink(struct lnet_handle_me meh)
 {
-       lnet_me_t *me;
+       struct lnet_me *me;
        lnet_libmd_t *md;
        lnet_event_t ev;
        int cpt;
@@ -256,7 +256,7 @@ EXPORT_SYMBOL(LNetMEUnlink);
 
 /* call with lnet_res_lock please */
 void
-lnet_me_unlink(lnet_me_t *me)
+lnet_me_unlink(struct lnet_me *me)
 {
        list_del(&me->me_list);
 
index 891d028e26e0ea81b123ad577a97fc533f7ba9af..b538939e79a723d116e63ecc586384e89e5df743 100644 (file)
@@ -140,7 +140,7 @@ lnet_try_match_md(lnet_libmd_t *md,
         */
        unsigned int offset;
        unsigned int mlength;
-       lnet_me_t *me = md->md_me;
+       struct lnet_me *me = md->md_me;
 
        /* MD exhausted */
        if (lnet_md_exhausted(md))
@@ -376,8 +376,8 @@ lnet_mt_match_md(struct lnet_match_table *mtable,
                 struct lnet_match_info *info, struct lnet_msg *msg)
 {
        struct list_head *head;
-       lnet_me_t *me;
-       lnet_me_t *tmp;
+       struct lnet_me *me;
+       struct lnet_me *tmp;
        int exhausted = 0;
        int rc;
 
@@ -641,7 +641,7 @@ lnet_ptl_match_md(struct lnet_match_info *info, struct lnet_msg *msg)
 }
 
 void
-lnet_ptl_detach_md(lnet_me_t *me, lnet_libmd_t *md)
+lnet_ptl_detach_md(struct lnet_me *me, lnet_libmd_t *md)
 {
        LASSERT(me->me_md == md && md->md_me == me);
 
@@ -651,7 +651,7 @@ lnet_ptl_detach_md(lnet_me_t *me, lnet_libmd_t *md)
 
 /* called with lnet_res_lock held */
 void
-lnet_ptl_attach_md(lnet_me_t *me, lnet_libmd_t *md,
+lnet_ptl_attach_md(struct lnet_me *me, lnet_libmd_t *md,
                   struct list_head *matches, struct list_head *drops)
 {
        struct lnet_portal *ptl = the_lnet.ln_portals[me->me_portal];
@@ -756,7 +756,7 @@ lnet_ptl_cleanup(struct lnet_portal *ptl)
        LASSERT(list_empty(&ptl->ptl_msg_stealing));
        cfs_percpt_for_each(mtable, i, ptl->ptl_mtables) {
                struct list_head *mhash;
-               lnet_me_t *me;
+               struct lnet_me *me;
                int j;
 
                if (!mtable->mt_mhash) /* uninitialized match-table */
@@ -767,7 +767,7 @@ lnet_ptl_cleanup(struct lnet_portal *ptl)
                for (j = 0; j < LNET_MT_HASH_SIZE + 1; j++) {
                        while (!list_empty(&mhash[j])) {
                                me = list_entry(mhash[j].next,
-                                               lnet_me_t, me_list);
+                                               struct lnet_me, me_list);
                                CERROR("Active ME %p on exit\n", me);
                                list_del(&me->me_list);
                                lnet_me_free(me);