[PATCH] Btrfs: Remove useless condition

Jaswinder Singh Rajput
2010-09-12T11:02:20Z

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