diff options
author | Jonathan Corbet <corbet@lwn.net> | 2008-07-14 17:29:34 -0400 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2008-07-14 17:29:34 -0400 |
commit | 2fceef397f9880b212a74c418290ce69e7ac00eb (patch) | |
tree | d9cc09ab992825ef7fede4a688103503e3caf655 /fs/dlm | |
parent | feae1ef116ed381625d3731c5ae4f4ebcb3fa302 (diff) | |
parent | bce7f793daec3e65ec5c5705d2457b81fe7b5725 (diff) |
Merge commit 'v2.6.26' into bkl-removal
Diffstat (limited to 'fs/dlm')
-rw-r--r-- | fs/dlm/lowcomms.c | 27 | ||||
-rw-r--r-- | fs/dlm/netlink.c | 2 | ||||
-rw-r--r-- | fs/dlm/plock.c | 2 |
3 files changed, 16 insertions, 15 deletions
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c index 7c1e5e5cccd8..637018c891ef 100644 --- a/fs/dlm/lowcomms.c +++ b/fs/dlm/lowcomms.c | |||
@@ -50,6 +50,7 @@ | |||
50 | #include <linux/pagemap.h> | 50 | #include <linux/pagemap.h> |
51 | #include <linux/idr.h> | 51 | #include <linux/idr.h> |
52 | #include <linux/file.h> | 52 | #include <linux/file.h> |
53 | #include <linux/mutex.h> | ||
53 | #include <linux/sctp.h> | 54 | #include <linux/sctp.h> |
54 | #include <net/sctp/user.h> | 55 | #include <net/sctp/user.h> |
55 | 56 | ||
@@ -138,7 +139,7 @@ static struct workqueue_struct *recv_workqueue; | |||
138 | static struct workqueue_struct *send_workqueue; | 139 | static struct workqueue_struct *send_workqueue; |
139 | 140 | ||
140 | static DEFINE_IDR(connections_idr); | 141 | static DEFINE_IDR(connections_idr); |
141 | static DECLARE_MUTEX(connections_lock); | 142 | static DEFINE_MUTEX(connections_lock); |
142 | static int max_nodeid; | 143 | static int max_nodeid; |
143 | static struct kmem_cache *con_cache; | 144 | static struct kmem_cache *con_cache; |
144 | 145 | ||
@@ -205,9 +206,9 @@ static struct connection *nodeid2con(int nodeid, gfp_t allocation) | |||
205 | { | 206 | { |
206 | struct connection *con; | 207 | struct connection *con; |
207 | 208 | ||
208 | down(&connections_lock); | 209 | mutex_lock(&connections_lock); |
209 | con = __nodeid2con(nodeid, allocation); | 210 | con = __nodeid2con(nodeid, allocation); |
210 | up(&connections_lock); | 211 | mutex_unlock(&connections_lock); |
211 | 212 | ||
212 | return con; | 213 | return con; |
213 | } | 214 | } |
@@ -218,15 +219,15 @@ static struct connection *assoc2con(int assoc_id) | |||
218 | int i; | 219 | int i; |
219 | struct connection *con; | 220 | struct connection *con; |
220 | 221 | ||
221 | down(&connections_lock); | 222 | mutex_lock(&connections_lock); |
222 | for (i=0; i<=max_nodeid; i++) { | 223 | for (i=0; i<=max_nodeid; i++) { |
223 | con = __nodeid2con(i, 0); | 224 | con = __nodeid2con(i, 0); |
224 | if (con && con->sctp_assoc == assoc_id) { | 225 | if (con && con->sctp_assoc == assoc_id) { |
225 | up(&connections_lock); | 226 | mutex_unlock(&connections_lock); |
226 | return con; | 227 | return con; |
227 | } | 228 | } |
228 | } | 229 | } |
229 | up(&connections_lock); | 230 | mutex_unlock(&connections_lock); |
230 | return NULL; | 231 | return NULL; |
231 | } | 232 | } |
232 | 233 | ||
@@ -381,7 +382,7 @@ static void sctp_init_failed(void) | |||
381 | int i; | 382 | int i; |
382 | struct connection *con; | 383 | struct connection *con; |
383 | 384 | ||
384 | down(&connections_lock); | 385 | mutex_lock(&connections_lock); |
385 | for (i=1; i<=max_nodeid; i++) { | 386 | for (i=1; i<=max_nodeid; i++) { |
386 | con = __nodeid2con(i, 0); | 387 | con = __nodeid2con(i, 0); |
387 | if (!con) | 388 | if (!con) |
@@ -393,7 +394,7 @@ static void sctp_init_failed(void) | |||
393 | } | 394 | } |
394 | } | 395 | } |
395 | } | 396 | } |
396 | up(&connections_lock); | 397 | mutex_unlock(&connections_lock); |
397 | } | 398 | } |
398 | 399 | ||
399 | /* Something happened to an association */ | 400 | /* Something happened to an association */ |
@@ -930,7 +931,7 @@ out_err: | |||
930 | * errors we try again until the max number of retries is reached. | 931 | * errors we try again until the max number of retries is reached. |
931 | */ | 932 | */ |
932 | if (result != -EHOSTUNREACH && result != -ENETUNREACH && | 933 | if (result != -EHOSTUNREACH && result != -ENETUNREACH && |
933 | result != -ENETDOWN && result != EINVAL | 934 | result != -ENETDOWN && result != -EINVAL |
934 | && result != -EPROTONOSUPPORT) { | 935 | && result != -EPROTONOSUPPORT) { |
935 | lowcomms_connect_sock(con); | 936 | lowcomms_connect_sock(con); |
936 | result = 0; | 937 | result = 0; |
@@ -1417,7 +1418,7 @@ void dlm_lowcomms_stop(void) | |||
1417 | /* Set all the flags to prevent any | 1418 | /* Set all the flags to prevent any |
1418 | socket activity. | 1419 | socket activity. |
1419 | */ | 1420 | */ |
1420 | down(&connections_lock); | 1421 | mutex_lock(&connections_lock); |
1421 | for (i = 0; i <= max_nodeid; i++) { | 1422 | for (i = 0; i <= max_nodeid; i++) { |
1422 | con = __nodeid2con(i, 0); | 1423 | con = __nodeid2con(i, 0); |
1423 | if (con) { | 1424 | if (con) { |
@@ -1426,11 +1427,11 @@ void dlm_lowcomms_stop(void) | |||
1426 | con->sock->sk->sk_user_data = NULL; | 1427 | con->sock->sk->sk_user_data = NULL; |
1427 | } | 1428 | } |
1428 | } | 1429 | } |
1429 | up(&connections_lock); | 1430 | mutex_unlock(&connections_lock); |
1430 | 1431 | ||
1431 | work_stop(); | 1432 | work_stop(); |
1432 | 1433 | ||
1433 | down(&connections_lock); | 1434 | mutex_lock(&connections_lock); |
1434 | clean_writequeues(); | 1435 | clean_writequeues(); |
1435 | 1436 | ||
1436 | for (i = 0; i <= max_nodeid; i++) { | 1437 | for (i = 0; i <= max_nodeid; i++) { |
@@ -1443,7 +1444,7 @@ void dlm_lowcomms_stop(void) | |||
1443 | } | 1444 | } |
1444 | } | 1445 | } |
1445 | max_nodeid = 0; | 1446 | max_nodeid = 0; |
1446 | up(&connections_lock); | 1447 | mutex_unlock(&connections_lock); |
1447 | kmem_cache_destroy(con_cache); | 1448 | kmem_cache_destroy(con_cache); |
1448 | idr_init(&connections_idr); | 1449 | idr_init(&connections_idr); |
1449 | } | 1450 | } |
diff --git a/fs/dlm/netlink.c b/fs/dlm/netlink.c index 714593621f4f..18bda83cc892 100644 --- a/fs/dlm/netlink.c +++ b/fs/dlm/netlink.c | |||
@@ -95,7 +95,7 @@ int __init dlm_netlink_init(void) | |||
95 | return rv; | 95 | return rv; |
96 | } | 96 | } |
97 | 97 | ||
98 | void __exit dlm_netlink_exit(void) | 98 | void dlm_netlink_exit(void) |
99 | { | 99 | { |
100 | genl_unregister_ops(&family, &dlm_nl_ops); | 100 | genl_unregister_ops(&family, &dlm_nl_ops); |
101 | genl_unregister_family(&family); | 101 | genl_unregister_family(&family); |
diff --git a/fs/dlm/plock.c b/fs/dlm/plock.c index d6d6e370f89c..78878c5781ca 100644 --- a/fs/dlm/plock.c +++ b/fs/dlm/plock.c | |||
@@ -379,7 +379,7 @@ static ssize_t dev_write(struct file *file, const char __user *u, size_t count, | |||
379 | struct plock_xop *xop; | 379 | struct plock_xop *xop; |
380 | xop = (struct plock_xop *)op; | 380 | xop = (struct plock_xop *)op; |
381 | if (xop->callback) | 381 | if (xop->callback) |
382 | count = dlm_plock_callback(op); | 382 | dlm_plock_callback(op); |
383 | else | 383 | else |
384 | wake_up(&recv_wq); | 384 | wake_up(&recv_wq); |
385 | } else | 385 | } else |