projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4d9b67c
)
ceph: remove redundant memset(0)
author
Ilya Dryomov
<ilya.dryomov@inktank.com>
Fri, 25 Jul 2014 08:44:58 +0000
(12:44 +0400)
committer
Ilya Dryomov
<ilya.dryomov@inktank.com>
Mon, 28 Jul 2014 09:28:33 +0000
(13:28 +0400)
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>
fs/ceph/xattr.c
patch
|
blob
|
history
diff --git
a/fs/ceph/xattr.c
b/fs/ceph/xattr.c
index c9c2b887381ec2504ee48c673cf113e396f3b04e..f89698cdbc413c65eda1cca5cbd07cf410eed20a 100644
(file)
--- a/
fs/ceph/xattr.c
+++ b/
fs/ceph/xattr.c
@@
-597,7
+597,7
@@
start:
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);