linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: jbacik@fusionio.com
Cc: linux-btrfs@vger.kernel.org
Subject: re: Btrfs: cleanup destroy_marked_extents
Date: Thu, 9 May 2013 15:22:06 +0300	[thread overview]
Message-ID: <20130509122206.GA997@elgon.mountain> (raw)

Hello Josef Bacik,

This is a semi-automatic email about new static checker warnings.

The patch fd8b2b611580: "Btrfs: cleanup destroy_marked_extents" from 
Apr 24, 2013, leads to the following Smatch complaint:

fs/btrfs/disk-io.c:3814 btrfs_destroy_marked_extents()
	 warn: variable dereferenced before check 'eb' (see line 3813)

fs/btrfs/disk-io.c
  3812							   root->leafsize);
  3813				start += eb->len;
                                         ^^^^^^^
New dereference.
  3814				if (!eb)
                                    ^^^
New check.  Maybe we should be adding "root->leafsize" here?  Just
the check earlier would cause a forever loop.

  3815					continue;
  3816				wait_on_extent_buffer_writeback(eb);

regards,
dan carpenter

             reply	other threads:[~2013-05-09 12:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-09 12:22 Dan Carpenter [this message]
2013-05-09 12:32 ` Btrfs: cleanup destroy_marked_extents Josef Bacik

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=20130509122206.GA997@elgon.mountain \
    --to=dan.carpenter@oracle.com \
    --cc=jbacik@fusionio.com \
    --cc=linux-btrfs@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).