linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jaswinder Singh Rajput <jaswinder@infradead.org>
To: Chris Mason <chris.mason@oracle.com>,
	linux-btrfs@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] Btrfs: Remove useless condition
Date: Sun, 12 Sep 2010 16:32:20 +0530	[thread overview]
Message-ID: <1284289340.2650.2.camel@ht.satnam> (raw)


if (ret) is useless as it will be never NULL as in previous statement
we are setting ret = prev for !ret

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Cc: Chris Mason <chris.mason@oracle.com>
---
 fs/btrfs/ordered-data.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/fs/btrfs/ordered-data.c b/fs/btrfs/ordered-data.c
index e56c72b..7b04008 100644
--- a/fs/btrfs/ordered-data.c
+++ b/fs/btrfs/ordered-data.c
@@ -154,8 +154,7 @@ static inline struct rb_node *tree_search(struct btrfs_ordered_inode_tree *tree,
 	ret = __tree_search(root, file_offset, &prev);
 	if (!ret)
 		ret = prev;
-	if (ret)
-		tree->last = ret;
+	tree->last = ret;
 	return ret;
 }
 
-- 
1.7.2.2




             reply	other threads:[~2010-09-12 11:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-12 11:02 Jaswinder Singh Rajput [this message]
2010-09-12 12:29 ` [PATCH] Btrfs: Remove useless condition Johannes Weiner
2010-09-12 13:56   ` Jaswinder Singh Rajput
2010-09-12 17:28     ` Mike Fedyk

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=1284289340.2650.2.camel@ht.satnam \
    --to=jaswinder@infradead.org \
    --cc=chris.mason@oracle.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).