summaryrefslogtreecommitdiff
path: root/net/mptcp/pm.c
diff options
context:
space:
mode:
authorPaolo Abeni <pabeni@redhat.com>2020-11-16 10:48:05 +0100
committerJakub Kicinski <kuba@kernel.org>2020-11-16 10:46:06 -0800
commitba8f48f7a4d79352b764ace585b5f602ef940be0 (patch)
tree5529c65bcb566b548f9ad99b28c5be155bc14be0 /net/mptcp/pm.c
parent77c3c95637526f1e4330cc9a4b2065f668c2c4fe (diff)
mptcp: introduce mptcp_schedule_work
remove some of code duplications an allow preventing rescheduling on close. Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/mptcp/pm.c')
-rw-r--r--net/mptcp/pm.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/mptcp/pm.c b/net/mptcp/pm.c
index e19e1525ecbb..f9c88e2abb8e 100644
--- a/net/mptcp/pm.c
+++ b/net/mptcp/pm.c
@@ -89,8 +89,7 @@ static bool mptcp_pm_schedule_work(struct mptcp_sock *msk,
return false;
msk->pm.status |= BIT(new_status);
- if (schedule_work(&msk->work))
- sock_hold((struct sock *)msk);
+ mptcp_schedule_work((struct sock *)msk);
return true;
}