keep from adding the local IP to dlm_local_addr again
PATCH 1/1 keep from adding the local IP to dlm_local_addr again
Hello,
This should be it for the lockspace weirdness patches. When we go to initialize the lowcomms stuff for a second time when using TCP, it fails complaining about not being able to work on a multihoned machine. This is because we've already increased the dlm_local_count before when we did this the first time. This patch fixes this problem by only searching for our local address if we haven't already gotten it. Thank you,
Josef
Signed-off-by Josef Bacik <[email protected]>
fs/dlm/lowcomms.c +6 -4
@@ -131,7 +131,7 @@ struct writequeue_entry { };static struct sockaddr_storage *dlm_local_addr[DLM_MAX_ADDR_COUNT ]; -static int dlm_local_count; +static int dlm_local_count =0 ;/* Work queues */ static struct workqueue_struct *recv_workqueue;
@@ -1424,10 +1424,12 @@ int dlm_lowcomms_start(void)int error = -EINVAL ;struct connection *con; -init_local ();if (!dlm_local_count) { -log_print ("no local IP address has been set" ); - goto out; +init_local (); +if (!dlm_local_count) { +log_print ("no local IP address has been set" ); + goto out; + } } error = -ENOMEM ;