Commit 9c5bef58 authored by Ying Xue's avatar Ying Xue Committed by David Teigland

dlm: cleanup send_to_sock routine

Remove unnecessary code form send_to_sock routine.
Signed-off-by: default avatarYing Xue <ying.xue@windriver.com>
Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
parent 4dd40f0c
...@@ -1486,8 +1486,7 @@ static void send_to_sock(struct connection *con) ...@@ -1486,8 +1486,7 @@ static void send_to_sock(struct connection *con)
} }
cond_resched(); cond_resched();
goto out; goto out;
} } else if (ret < 0)
if (ret <= 0)
goto send_error; goto send_error;
} }
...@@ -1504,7 +1503,6 @@ static void send_to_sock(struct connection *con) ...@@ -1504,7 +1503,6 @@ static void send_to_sock(struct connection *con)
if (e->len == 0 && e->users == 0) { if (e->len == 0 && e->users == 0) {
list_del(&e->list); list_del(&e->list);
free_entry(e); free_entry(e);
continue;
} }
} }
spin_unlock(&con->writequeue_lock); spin_unlock(&con->writequeue_lock);
...@@ -1522,7 +1520,6 @@ static void send_to_sock(struct connection *con) ...@@ -1522,7 +1520,6 @@ static void send_to_sock(struct connection *con)
mutex_unlock(&con->sock_mutex); mutex_unlock(&con->sock_mutex);
if (!test_bit(CF_INIT_PENDING, &con->flags)) if (!test_bit(CF_INIT_PENDING, &con->flags))
lowcomms_connect_sock(con); lowcomms_connect_sock(con);
return;
} }
static void clean_one_writequeue(struct connection *con) static void clean_one_writequeue(struct connection *con)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment