ceph: remove redundant memset(0)

xattrs array of pointers is allocated with kcalloc() - no need to
memset() it to 0 right after that.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Reviewed-by: Alex Elder <elder@linaro.org>
This commit is contained in:
Ilya Dryomov 2014-07-25 12:44:58 +04:00
parent 4d9b67cddd
commit 1a295bd8c8

View File

@ -597,7 +597,7 @@ static int __build_xattrs(struct inode *inode)
err = -ENOMEM;
if (!xattrs)
goto bad_lock;
memset(xattrs, 0, numattr*sizeof(struct ceph_xattr *));
for (i = 0; i < numattr; i++) {
xattrs[i] = kmalloc(sizeof(struct ceph_inode_xattr),
GFP_NOFS);