Whamcloud - gitweb
LU-18822 build: fix symbol redeclaration error in socklnd_lib.c 41/58441/2
authorJian Yu <yujian@whamcloud.com>
Mon, 17 Mar 2025 18:30:57 +0000 (11:30 -0700)
committerOleg Drokin <green@whamcloud.com>
Wed, 26 Mar 2025 04:06:37 +0000 (04:06 +0000)
This patch fixes the following symbol redeclaration errors
in socklnd_lib.c:

  lnet/klnds/socklnd/socklnd_lib.c: In function 'ksocknal_lib_recv_kiov':
  lnet/klnds/socklnd/socklnd_lib.c:314:23: error: 'scratchiov' redeclared as different kind of symbol
    314 |         struct kvec  *scratchiov = &scratch;
        |                       ^~~~~~~~~~
  lnet/klnds/socklnd/socklnd_lib.c:310:37: note: previous definition of 'scratchiov' with type 'struct kvec *'
    310 |                        struct kvec *scratchiov)
        |                        ~~~~~~~~~~~~~^~~~~~~~~~
  lnet/klnds/socklnd/socklnd_lib.c:315:24: error: 'pages' redeclared as different kind of symbol
    315 |         struct page  **pages      = NULL;
        |                        ^~~~~
  lnet/klnds/socklnd/socklnd_lib.c:309:63: note: previous definition of 'pages' with type 'struct page **'
    309 | ksocknal_lib_recv_kiov(struct ksock_conn *conn, struct page **pages,
        |                                                 ~~~~~~~~~~~~~~^~~~~

Fixes: 89df5e712f ("LU-11415 socklnd: improve scheduling algorithm")
Change-Id: I047746e93ef1b4421f0bf7ff0c39848996698331
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58441
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Hongchao Zhang <hongchao@whamcloud.com>
Reviewed-by: Cyril Bordage <cbordage@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/klnds/socklnd/socklnd_lib.c

index 7700fa8..2b9dbc5 100644 (file)
@@ -68,7 +68,7 @@ ksocknal_lib_send_hdr(struct ksock_conn *conn, struct ksock_tx *tx,
        {
 #if SOCKNAL_SINGLE_FRAG_TX
                struct kvec scratch;
-               struct kvec *scratchiov = &scratch;
+               scratchiov = &scratch;
                unsigned int niov = 1;
 #else
                unsigned int niov = tx->tx_niov;
@@ -144,7 +144,7 @@ ksocknal_lib_send_kiov(struct ksock_conn *conn, struct ksock_tx *tx,
        } else {
 #if SOCKNAL_SINGLE_FRAG_TX || !SOCKNAL_RISK_KMAP_DEADLOCK
                struct kvec scratch;
-               struct kvec *scratchiov = &scratch;
+               scratchiov = &scratch;
                unsigned int niov = 1;
 #else
 #ifdef CONFIG_HIGHMEM
@@ -190,7 +190,7 @@ ksocknal_lib_recv_iov(struct ksock_conn *conn, struct kvec *scratchiov)
 {
 #if SOCKNAL_SINGLE_FRAG_RX
        struct kvec  scratch;
-       struct kvec *scratchiov = &scratch;
+       scratchiov = &scratch;
        unsigned int niov = 1;
 #else
        unsigned int niov = conn->ksnc_rx_niov;
@@ -297,8 +297,8 @@ ksocknal_lib_recv_kiov(struct ksock_conn *conn, struct page **pages,
 {
 #if SOCKNAL_SINGLE_FRAG_RX || !SOCKNAL_RISK_KMAP_DEADLOCK
        struct kvec   scratch;
-       struct kvec  *scratchiov = &scratch;
-       struct page  **pages      = NULL;
+       scratchiov = &scratch;
+       pages      = NULL;
        unsigned int   niov       = 1;
 #else
 #ifdef CONFIG_HIGHMEM