Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 276769
b: refs/heads/master
c: 48b28b8
h: refs/heads/master
i:
  276767: bae5a8f
v: v3
  • Loading branch information
David Herrmann authored and Gustavo F. Padovan committed Nov 21, 2011
1 parent a625a6f commit 536bcf9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2ac654f740b574c58ee02bac3816cf466a1bfb41
refs/heads/master: 48b28b8db9a74cc5c43e76485dc397e22bea2984
5 changes: 3 additions & 2 deletions trunk/net/bluetooth/cmtp/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,12 @@ static struct cmtp_session *__cmtp_get_session(bdaddr_t *bdaddr)

static void __cmtp_link_session(struct cmtp_session *session)
{
__module_get(THIS_MODULE);
list_add(&session->list, &cmtp_session_list);
}

static void __cmtp_unlink_session(struct cmtp_session *session)
{
list_del(&session->list);
module_put(THIS_MODULE);
}

static void __cmtp_copy_session(struct cmtp_session *session, struct cmtp_conninfo *ci)
Expand Down Expand Up @@ -327,6 +325,7 @@ static int cmtp_session(void *arg)
up_write(&cmtp_session_sem);

kfree(session);
module_put_and_exit(0);
return 0;
}

Expand Down Expand Up @@ -376,9 +375,11 @@ int cmtp_add_connection(struct cmtp_connadd_req *req, struct socket *sock)

__cmtp_link_session(session);

__module_get(THIS_MODULE);
session->task = kthread_run(cmtp_session, session, "kcmtpd_ctr_%d",
session->num);
if (IS_ERR(session->task)) {
module_put(THIS_MODULE);
err = PTR_ERR(session->task);
goto unlink;
}
Expand Down

0 comments on commit 536bcf9

Please sign in to comment.