CEPH filesystem development
 help / color / mirror / Atom feed
From: Alex Elder <elder@ieee.org>
To: Ilya Dryomov <ilya.dryomov@inktank.com>, ceph-devel@vger.kernel.org
Cc: Yan Zheng <zheng.z.yan@intel.com>
Subject: Re: [PATCH] ceph: remove redundant memset(0)
Date: Fri, 25 Jul 2014 07:47:13 -0500	[thread overview]
Message-ID: <53D251D1.6010700@ieee.org> (raw)
In-Reply-To: <1406280364-30198-1-git-send-email-ilya.dryomov@inktank.com>

On 07/25/2014 04:26 AM, Ilya Dryomov wrote:
> 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>

Looks good.

Reviewed-by: Alex Elder <elder@linaro.org>

> ---
>  fs/ceph/xattr.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 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:
>  		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);
> 


      reply	other threads:[~2014-07-25 12:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-25  9:26 [PATCH] ceph: remove redundant memset(0) Ilya Dryomov
2014-07-25 12:47 ` Alex Elder [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53D251D1.6010700@ieee.org \
    --to=elder@ieee.org \
    --cc=ceph-devel@vger.kernel.org \
    --cc=ilya.dryomov@inktank.com \
    --cc=zheng.z.yan@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox