diff options
author | Ilya Dryomov <ilya.dryomov@inktank.com> | 2014-07-25 04:44:58 -0400 |
---|---|---|
committer | Ilya Dryomov <ilya.dryomov@inktank.com> | 2014-07-28 05:28:33 -0400 |
commit | 1a295bd8c854de221813d0ba0848031a8985b869 (patch) | |
tree | 652ad3aed1d29f177e01ad4f30da9ac71e83739e /fs/ceph | |
parent | 4d9b67cddd9b9bc320473a334cc8023a4186092f (diff) |
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>
Diffstat (limited to 'fs/ceph')
-rw-r--r-- | fs/ceph/xattr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ceph/xattr.c b/fs/ceph/xattr.c index c9c2b887381e..f89698cdbc41 100644 --- a/fs/ceph/xattr.c +++ b/fs/ceph/xattr.c | |||
@@ -597,7 +597,7 @@ start: | |||
597 | err = -ENOMEM; | 597 | err = -ENOMEM; |
598 | if (!xattrs) | 598 | if (!xattrs) |
599 | goto bad_lock; | 599 | goto bad_lock; |
600 | memset(xattrs, 0, numattr*sizeof(struct ceph_xattr *)); | 600 | |
601 | for (i = 0; i < numattr; i++) { | 601 | for (i = 0; i < numattr; i++) { |
602 | xattrs[i] = kmalloc(sizeof(struct ceph_inode_xattr), | 602 | xattrs[i] = kmalloc(sizeof(struct ceph_inode_xattr), |
603 | GFP_NOFS); | 603 | GFP_NOFS); |