diff options
Diffstat (limited to 'fs/ceph/messenger.c')
-rw-r--r-- | fs/ceph/messenger.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/ceph/messenger.c b/fs/ceph/messenger.c index a32f0f896d9f..cdaaa131add3 100644 --- a/fs/ceph/messenger.c +++ b/fs/ceph/messenger.c | |||
@@ -6,6 +6,7 @@ | |||
6 | #include <linux/inet.h> | 6 | #include <linux/inet.h> |
7 | #include <linux/kthread.h> | 7 | #include <linux/kthread.h> |
8 | #include <linux/net.h> | 8 | #include <linux/net.h> |
9 | #include <linux/slab.h> | ||
9 | #include <linux/socket.h> | 10 | #include <linux/socket.h> |
10 | #include <linux/string.h> | 11 | #include <linux/string.h> |
11 | #include <net/tcp.h> | 12 | #include <net/tcp.h> |
@@ -29,6 +30,10 @@ static char tag_msg = CEPH_MSGR_TAG_MSG; | |||
29 | static char tag_ack = CEPH_MSGR_TAG_ACK; | 30 | static char tag_ack = CEPH_MSGR_TAG_ACK; |
30 | static char tag_keepalive = CEPH_MSGR_TAG_KEEPALIVE; | 31 | static char tag_keepalive = CEPH_MSGR_TAG_KEEPALIVE; |
31 | 32 | ||
33 | #ifdef CONFIG_LOCKDEP | ||
34 | static struct lock_class_key socket_class; | ||
35 | #endif | ||
36 | |||
32 | 37 | ||
33 | static void queue_con(struct ceph_connection *con); | 38 | static void queue_con(struct ceph_connection *con); |
34 | static void con_work(struct work_struct *); | 39 | static void con_work(struct work_struct *); |
@@ -227,6 +232,10 @@ static struct socket *ceph_tcp_connect(struct ceph_connection *con) | |||
227 | con->sock = sock; | 232 | con->sock = sock; |
228 | sock->sk->sk_allocation = GFP_NOFS; | 233 | sock->sk->sk_allocation = GFP_NOFS; |
229 | 234 | ||
235 | #ifdef CONFIG_LOCKDEP | ||
236 | lockdep_set_class(&sock->sk->sk_lock, &socket_class); | ||
237 | #endif | ||
238 | |||
230 | set_sock_callbacks(sock, con); | 239 | set_sock_callbacks(sock, con); |
231 | 240 | ||
232 | dout("connect %s\n", pr_addr(&con->peer_addr.in_addr)); | 241 | dout("connect %s\n", pr_addr(&con->peer_addr.in_addr)); |
@@ -332,6 +341,7 @@ static void reset_connection(struct ceph_connection *con) | |||
332 | con->out_msg = NULL; | 341 | con->out_msg = NULL; |
333 | } | 342 | } |
334 | con->in_seq = 0; | 343 | con->in_seq = 0; |
344 | con->in_seq_acked = 0; | ||
335 | } | 345 | } |
336 | 346 | ||
337 | /* | 347 | /* |