From 25911d2c895960cc9ebaf7ea34fa9c218689a32a Mon Sep 17 00:00:00 2001 From: Alexander Viro Date: Tue, 21 Sep 2004 02:47:25 -0700 Subject: [PATCH] [PATCH] cifs: annotate DELETE_DIRECTORY_{REQ,RESP} Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- fs/cifs/cifspdu.h | 2 +- fs/cifs/cifssmb.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/fs/cifs/cifspdu.h b/fs/cifs/cifspdu.h index 3c33db7fe9f79..0e9dc09237648 100644 --- a/fs/cifs/cifspdu.h +++ b/fs/cifs/cifspdu.h @@ -840,7 +840,7 @@ typedef struct smb_com_delete_file_rsp { typedef struct smb_com_delete_directory_req { struct smb_hdr hdr; /* wct = 0 */ - __u16 ByteCount; + __le16 ByteCount; __u8 BufferFormat; /* 4 = ASCII */ unsigned char DirName[1]; } DELETE_DIRECTORY_REQ; diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index e800c0af48cc2..793d66a4bdc3a 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c @@ -487,10 +487,9 @@ RmDirRetry: strncpy(pSMB->DirName, dirName, name_len); } - pSMB->ByteCount = name_len + 1; pSMB->BufferFormat = 0x04; - pSMB->hdr.smb_buf_length += pSMB->ByteCount; - pSMB->ByteCount = cpu_to_le16(pSMB->ByteCount); + pSMB->hdr.smb_buf_length += name_len + 1; + pSMB->ByteCount = cpu_to_le16(name_len + 1); rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, (struct smb_hdr *) pSMBr, &bytes_returned, 0); if (rc) { -- 2.53.0