diff options
author | Steve French <sfrench@us.ibm.com> | 2005-12-12 20:53:18 -0800 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2005-12-12 20:53:18 -0800 |
commit | ec637e3ffb6b978143652477c7c5f96c9519b691 (patch) | |
tree | 32533b8f101e1d85b3499050eef29e78480e5cae /fs/cifs/inode.c | |
parent | c89a86bb96307019867d11874ef0b86adaa0598e (diff) |
[CIFS] Avoid extra large buffer allocation (and memcpy) in cifs_readpages
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/inode.c')
-rw-r--r-- | fs/cifs/inode.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index d1e995757436..f65310cc60a1 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c @@ -229,11 +229,12 @@ static int decode_sfu_inode(struct inode * inode, __u64 size, cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); if (rc==0) { + int buf_type = CIFS_NO_BUFFER; /* Read header */ rc = CIFSSMBRead(xid, pTcon, netfid, 24 /* length */, 0 /* offset */, - &bytes_read, &pbuf); + &bytes_read, &pbuf, &buf_type); if((rc == 0) && (bytes_read >= 8)) { if(memcmp("IntxBLK", pbuf, 8) == 0) { cFYI(1,("Block device")); @@ -267,7 +268,7 @@ static int decode_sfu_inode(struct inode * inode, __u64 size, } else { inode->i_mode |= S_IFREG; /* then it is a file */ rc = -EOPNOTSUPP; /* or some unknown SFU type */ - } + } CIFSSMBClose(xid, pTcon, netfid); } return rc; |