linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Josef Bacik <josef@redhat.com>
To: Ilya Dryomov <idryomov@gmail.com>
Cc: linux-btrfs@vger.kernel.org, Josef Bacik <josef@redhat.com>,
	Chris Mason <chris.mason@oracle.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] Btrfs: remove unneeded allocation in load_free_space_cache()
Date: Wed, 19 Jan 2011 13:51:21 -0500	[thread overview]
Message-ID: <20110119185120.GA4050@localhost.localdomain> (raw)
In-Reply-To: <20110119165836.GB1358@kwango.lan.net>

On Wed, Jan 19, 2011 at 06:58:37PM +0200, Ilya Dryomov wrote:
> I messed up size argument of kzalloc() and consequently memcpy().  Here
> is an updated version.
> 
> 
> The checksums array is unused, remove it.  We only need disk_crcs array
> to verify checksums.
> 
> There is no need to allocate first_page_offset bytes for disk_crcs
> array.  It's enough to allocate (sizeof(u32) * num_checksums) bytes
> because disk_crcs should only hold checksums.  gen is fetched
> directly from the page.
> 
> cur_crc is initialized later in the code.  Don't initialize it in a
> declaration.
> 
> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>

Reviewed-by: Josef Bacik <josef@redhat.com>

Thanks,

Josef

      reply	other threads:[~2011-01-19 18:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-19 15:34 [PATCH] Btrfs: remove unneeded allocation in load_free_space_cache() Ilya Dryomov
2011-01-19 16:58 ` [PATCH v2] " Ilya Dryomov
2011-01-19 18:51   ` Josef Bacik [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=20110119185120.GA4050@localhost.localdomain \
    --to=josef@redhat.com \
    --cc=chris.mason@oracle.com \
    --cc=idryomov@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).