diff options
author | Jeff Layton <jlayton@redhat.com> | 2008-12-01 07:09:34 -0500 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2008-12-25 21:29:09 -0500 |
commit | 24b9b06ba7ea53aa0c4d0b1c8c1e93aa1bd9fe72 (patch) | |
tree | 0579c98dcbc075c236dc42f24aba1303da8bad85 /fs | |
parent | 4a6908a3a050aacc9c3a2f36b276b46c0629ad91 (diff) |
cifs: remove unused SMB session pointer from struct mid_q_entry
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/cifs/cifsglob.h | 1 | ||||
-rw-r--r-- | fs/cifs/transport.c | 13 |
2 files changed, 4 insertions, 10 deletions
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index c57c0565547f..82e28f5515c8 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h | |||
@@ -422,7 +422,6 @@ struct mid_q_entry { | |||
422 | unsigned long when_sent; /* time when smb send finished */ | 422 | unsigned long when_sent; /* time when smb send finished */ |
423 | unsigned long when_received; /* when demux complete (taken off wire) */ | 423 | unsigned long when_received; /* when demux complete (taken off wire) */ |
424 | #endif | 424 | #endif |
425 | struct cifsSesInfo *ses; /* smb was sent to this server */ | ||
426 | struct task_struct *tsk; /* task waiting for response */ | 425 | struct task_struct *tsk; /* task waiting for response */ |
427 | struct smb_hdr *resp_buf; /* response buffer */ | 426 | struct smb_hdr *resp_buf; /* response buffer */ |
428 | int midState; /* wish this were enum but can not pass to wait_event */ | 427 | int midState; /* wish this were enum but can not pass to wait_event */ |
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c index ff8243a8fe3e..8e0d1c397c73 100644 --- a/fs/cifs/transport.c +++ b/fs/cifs/transport.c | |||
@@ -37,15 +37,11 @@ extern mempool_t *cifs_mid_poolp; | |||
37 | extern struct kmem_cache *cifs_oplock_cachep; | 37 | extern struct kmem_cache *cifs_oplock_cachep; |
38 | 38 | ||
39 | static struct mid_q_entry * | 39 | static struct mid_q_entry * |
40 | AllocMidQEntry(const struct smb_hdr *smb_buffer, struct cifsSesInfo *ses) | 40 | AllocMidQEntry(const struct smb_hdr *smb_buffer, struct TCP_Server_Info *server) |
41 | { | 41 | { |
42 | struct mid_q_entry *temp; | 42 | struct mid_q_entry *temp; |
43 | 43 | ||
44 | if (ses == NULL) { | 44 | if (server == NULL) { |
45 | cERROR(1, ("Null session passed in to AllocMidQEntry")); | ||
46 | return NULL; | ||
47 | } | ||
48 | if (ses->server == NULL) { | ||
49 | cERROR(1, ("Null TCP session in AllocMidQEntry")); | 45 | cERROR(1, ("Null TCP session in AllocMidQEntry")); |
50 | return NULL; | 46 | return NULL; |
51 | } | 47 | } |
@@ -62,12 +58,11 @@ AllocMidQEntry(const struct smb_hdr *smb_buffer, struct cifsSesInfo *ses) | |||
62 | /* do_gettimeofday(&temp->when_sent);*/ /* easier to use jiffies */ | 58 | /* do_gettimeofday(&temp->when_sent);*/ /* easier to use jiffies */ |
63 | /* when mid allocated can be before when sent */ | 59 | /* when mid allocated can be before when sent */ |
64 | temp->when_alloc = jiffies; | 60 | temp->when_alloc = jiffies; |
65 | temp->ses = ses; | ||
66 | temp->tsk = current; | 61 | temp->tsk = current; |
67 | } | 62 | } |
68 | 63 | ||
69 | spin_lock(&GlobalMid_Lock); | 64 | spin_lock(&GlobalMid_Lock); |
70 | list_add_tail(&temp->qhead, &ses->server->pending_mid_q); | 65 | list_add_tail(&temp->qhead, &server->pending_mid_q); |
71 | atomic_inc(&midCount); | 66 | atomic_inc(&midCount); |
72 | temp->midState = MID_REQUEST_ALLOCATED; | 67 | temp->midState = MID_REQUEST_ALLOCATED; |
73 | spin_unlock(&GlobalMid_Lock); | 68 | spin_unlock(&GlobalMid_Lock); |
@@ -400,7 +395,7 @@ static int allocate_mid(struct cifsSesInfo *ses, struct smb_hdr *in_buf, | |||
400 | return -EAGAIN; | 395 | return -EAGAIN; |
401 | /* else ok - we are setting up session */ | 396 | /* else ok - we are setting up session */ |
402 | } | 397 | } |
403 | *ppmidQ = AllocMidQEntry(in_buf, ses); | 398 | *ppmidQ = AllocMidQEntry(in_buf, ses->server); |
404 | if (*ppmidQ == NULL) | 399 | if (*ppmidQ == NULL) |
405 | return -ENOMEM; | 400 | return -ENOMEM; |
406 | return 0; | 401 | return 0; |