diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-28 12:46:00 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-28 12:46:00 -0400 |
commit | 3988ba0708e98b4bafc9034aa476775520bee708 (patch) | |
tree | 8c706018fef444bc16b33fa8208e78cabf993a1f /fs | |
parent | d9089c296bdd82e6c1b7f82d04c11b5decde75e7 (diff) | |
parent | 18c60c0a3b16fc7d6a55497a228602ad8509f838 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm:
dlm: fix uninitialized variable for search_rsb_list callers
dlm: release socket on error
dlm: fix basts for granted CW waiting PR/CW
dlm: check for null in device_write
Diffstat (limited to 'fs')
-rw-r--r-- | fs/dlm/lock.c | 4 | ||||
-rw-r--r-- | fs/dlm/lowcomms.c | 4 | ||||
-rw-r--r-- | fs/dlm/user.c | 2 |
3 files changed, 7 insertions, 3 deletions
diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c index 2d3d1027ce2b..724ddac91538 100644 --- a/fs/dlm/lock.c +++ b/fs/dlm/lock.c | |||
@@ -363,6 +363,7 @@ static int search_rsb_list(struct list_head *head, char *name, int len, | |||
363 | if (len == r->res_length && !memcmp(name, r->res_name, len)) | 363 | if (len == r->res_length && !memcmp(name, r->res_name, len)) |
364 | goto found; | 364 | goto found; |
365 | } | 365 | } |
366 | *r_ret = NULL; | ||
366 | return -EBADR; | 367 | return -EBADR; |
367 | 368 | ||
368 | found: | 369 | found: |
@@ -1782,7 +1783,8 @@ static void grant_pending_locks(struct dlm_rsb *r) | |||
1782 | 1783 | ||
1783 | list_for_each_entry_safe(lkb, s, &r->res_grantqueue, lkb_statequeue) { | 1784 | list_for_each_entry_safe(lkb, s, &r->res_grantqueue, lkb_statequeue) { |
1784 | if (lkb->lkb_bastfn && lock_requires_bast(lkb, high, cw)) { | 1785 | if (lkb->lkb_bastfn && lock_requires_bast(lkb, high, cw)) { |
1785 | if (cw && high == DLM_LOCK_PR) | 1786 | if (cw && high == DLM_LOCK_PR && |
1787 | lkb->lkb_grmode == DLM_LOCK_PR) | ||
1786 | queue_bast(r, lkb, DLM_LOCK_CW); | 1788 | queue_bast(r, lkb, DLM_LOCK_CW); |
1787 | else | 1789 | else |
1788 | queue_bast(r, lkb, high); | 1790 | queue_bast(r, lkb, high); |
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c index 637018c891ef..3962262f991a 100644 --- a/fs/dlm/lowcomms.c +++ b/fs/dlm/lowcomms.c | |||
@@ -891,8 +891,10 @@ static void tcp_connect_to_sock(struct connection *con) | |||
891 | goto out_err; | 891 | goto out_err; |
892 | 892 | ||
893 | memset(&saddr, 0, sizeof(saddr)); | 893 | memset(&saddr, 0, sizeof(saddr)); |
894 | if (dlm_nodeid_to_addr(con->nodeid, &saddr)) | 894 | if (dlm_nodeid_to_addr(con->nodeid, &saddr)) { |
895 | sock_release(sock); | ||
895 | goto out_err; | 896 | goto out_err; |
897 | } | ||
896 | 898 | ||
897 | sock->sk->sk_user_data = con; | 899 | sock->sk->sk_user_data = con; |
898 | con->rx_action = receive_from_sock; | 900 | con->rx_action = receive_from_sock; |
diff --git a/fs/dlm/user.c b/fs/dlm/user.c index f976f303c196..929e48ae7591 100644 --- a/fs/dlm/user.c +++ b/fs/dlm/user.c | |||
@@ -539,7 +539,7 @@ static ssize_t device_write(struct file *file, const char __user *buf, | |||
539 | 539 | ||
540 | /* do we really need this? can a write happen after a close? */ | 540 | /* do we really need this? can a write happen after a close? */ |
541 | if ((kbuf->cmd == DLM_USER_LOCK || kbuf->cmd == DLM_USER_UNLOCK) && | 541 | if ((kbuf->cmd == DLM_USER_LOCK || kbuf->cmd == DLM_USER_UNLOCK) && |
542 | test_bit(DLM_PROC_FLAGS_CLOSING, &proc->flags)) | 542 | (proc && test_bit(DLM_PROC_FLAGS_CLOSING, &proc->flags))) |
543 | return -EINVAL; | 543 | return -EINVAL; |
544 | 544 | ||
545 | sigfillset(&allsigs); | 545 | sigfillset(&allsigs); |