diff options
Diffstat (limited to 'fs/smbfs')
-rw-r--r-- | fs/smbfs/request.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/smbfs/request.c b/fs/smbfs/request.c index 723f7c667661..c288fbe7953d 100644 --- a/fs/smbfs/request.c +++ b/fs/smbfs/request.c | |||
@@ -6,6 +6,7 @@ | |||
6 | * Please add a note about your changes to smbfs in the ChangeLog file. | 6 | * Please add a note about your changes to smbfs in the ChangeLog file. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/kernel.h> | ||
9 | #include <linux/types.h> | 10 | #include <linux/types.h> |
10 | #include <linux/fs.h> | 11 | #include <linux/fs.h> |
11 | #include <linux/slab.h> | 12 | #include <linux/slab.h> |
@@ -22,8 +23,6 @@ | |||
22 | /* #define SMB_SLAB_DEBUG (SLAB_RED_ZONE | SLAB_POISON) */ | 23 | /* #define SMB_SLAB_DEBUG (SLAB_RED_ZONE | SLAB_POISON) */ |
23 | #define SMB_SLAB_DEBUG 0 | 24 | #define SMB_SLAB_DEBUG 0 |
24 | 25 | ||
25 | #define ROUND_UP(x) (((x)+3) & ~3) | ||
26 | |||
27 | /* cache for request structures */ | 26 | /* cache for request structures */ |
28 | static struct kmem_cache *req_cachep; | 27 | static struct kmem_cache *req_cachep; |
29 | 28 | ||
@@ -200,8 +199,8 @@ static int smb_setup_trans2request(struct smb_request *req) | |||
200 | 199 | ||
201 | const int smb_parameters = 15; | 200 | const int smb_parameters = 15; |
202 | const int header = SMB_HEADER_LEN + 2 * smb_parameters + 2; | 201 | const int header = SMB_HEADER_LEN + 2 * smb_parameters + 2; |
203 | const int oparam = ROUND_UP(header + 3); | 202 | const int oparam = ALIGN(header + 3, sizeof(u32)); |
204 | const int odata = ROUND_UP(oparam + req->rq_lparm); | 203 | const int odata = ALIGN(oparam + req->rq_lparm, sizeof(u32)); |
205 | const int bcc = (req->rq_data ? odata + req->rq_ldata : | 204 | const int bcc = (req->rq_data ? odata + req->rq_ldata : |
206 | oparam + req->rq_lparm) - header; | 205 | oparam + req->rq_lparm) - header; |
207 | 206 | ||