From f3ae10b92301294988d784a76e70219a9119a38b Mon Sep 17 00:00:00 2001 From: Milind Arun Choudhary Date: Tue, 8 May 2007 00:29:03 -0700 Subject: [PATCH] --- yaml --- r: 54659 b: refs/heads/master c: 1525dccbc248b87568f2477f1b2d417b69d418c3 h: refs/heads/master i: 54657: aba8f0817a91668ec3694d09d1f1e7d7250973e8 54655: 96fa05069e3b6ca1b42e1f7d6995a4d86d1772a6 v: v3 --- [refs] | 2 +- trunk/fs/smbfs/request.c | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index b7bbba15e58c..f652d950528a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 022a1692444cd683ef42f637cc717db4d8fd9378 +refs/heads/master: 1525dccbc248b87568f2477f1b2d417b69d418c3 diff --git a/trunk/fs/smbfs/request.c b/trunk/fs/smbfs/request.c index 723f7c667661..c288fbe7953d 100644 --- a/trunk/fs/smbfs/request.c +++ b/trunk/fs/smbfs/request.c @@ -6,6 +6,7 @@ * Please add a note about your changes to smbfs in the ChangeLog file. */ +#include #include #include #include @@ -22,8 +23,6 @@ /* #define SMB_SLAB_DEBUG (SLAB_RED_ZONE | SLAB_POISON) */ #define SMB_SLAB_DEBUG 0 -#define ROUND_UP(x) (((x)+3) & ~3) - /* cache for request structures */ static struct kmem_cache *req_cachep; @@ -200,8 +199,8 @@ static int smb_setup_trans2request(struct smb_request *req) const int smb_parameters = 15; const int header = SMB_HEADER_LEN + 2 * smb_parameters + 2; - const int oparam = ROUND_UP(header + 3); - const int odata = ROUND_UP(oparam + req->rq_lparm); + const int oparam = ALIGN(header + 3, sizeof(u32)); + const int odata = ALIGN(oparam + req->rq_lparm, sizeof(u32)); const int bcc = (req->rq_data ? odata + req->rq_ldata : oparam + req->rq_lparm) - header;