lkml.org 
[lkml]   [2010]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[PATCH]btrfs: Remove a extra condition
From
This patch remove a extra condition.
In this place, the outer is if (!cur || !uptodate)
and then, there are 2 ways: !cur or ! uptodate.
The "else if (!uptodate)" is not necessary.
I think "else" is better.
---
Signed-off-by: Liuwenyi <qingshenlwy@gmail.com>
---
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
index c4bc570..654f702 100644
--- a/fs/btrfs/ctree.c
+++ b/fs/btrfs/ctree.c
@@ -679,7 +679,7 @@ int btrfs_realloc_node(struct btrfs_trans_handle *trans,
if (!cur) {
cur = read_tree_block(root, blocknr,
blocksize, gen);
- } else if (!uptodate) {
+ } else {
btrfs_read_buffer(cur, gen);
}
}
---
Best Regards,
Liuwenyi
20100107


\
 
 \ /
  Last update: 2010-01-06 15:15    [from the cache]
©2003-2011 Jasper Spaans