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:
parent
4d9b67cddd
commit
1a295bd8c8
|
@ -597,7 +597,7 @@ start:
|
||||||
err = -ENOMEM;
|
err = -ENOMEM;
|
||||||
if (!xattrs)
|
if (!xattrs)
|
||||||
goto bad_lock;
|
goto bad_lock;
|
||||||
memset(xattrs, 0, numattr*sizeof(struct ceph_xattr *));
|
|
||||||
for (i = 0; i < numattr; i++) {
|
for (i = 0; i < numattr; i++) {
|
||||||
xattrs[i] = kmalloc(sizeof(struct ceph_inode_xattr),
|
xattrs[i] = kmalloc(sizeof(struct ceph_inode_xattr),
|
||||||
GFP_NOFS);
|
GFP_NOFS);
|
||||||
|
|
Loading…
Reference in New Issue