diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2014-01-23 18:56:13 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-23 19:37:03 -0500 |
commit | ed8f68669a27287a3b15882e8d88ebccae75ec59 (patch) | |
tree | b3d1a78b844e00f6b7640c626dc807a27886a4a3 /fs/ext3 | |
parent | b1c8047c6b474c639d923122ab84732cbfeb7225 (diff) |
fs-ext3-use-rbtree-postorder-iteration-helper-instead-of-opencoding-fix
use do{}while - more efficient and it squishes a coccinelle warning
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Cc: Cody P Schafer <cody@linux.vnet.ibm.com>
Cc: Jan Kara <jack@suse.cz>
Cc: Michel Lespinasse <walken@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ext3')
-rw-r--r-- | fs/ext3/dir.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/ext3/dir.c b/fs/ext3/dir.c index a331ad1c23f8..e66e4808719f 100644 --- a/fs/ext3/dir.c +++ b/fs/ext3/dir.c | |||
@@ -312,11 +312,11 @@ static void free_rb_tree_fname(struct rb_root *root) | |||
312 | struct fname *fname, *next; | 312 | struct fname *fname, *next; |
313 | 313 | ||
314 | rbtree_postorder_for_each_entry_safe(fname, next, root, rb_hash) | 314 | rbtree_postorder_for_each_entry_safe(fname, next, root, rb_hash) |
315 | while (fname) { | 315 | do { |
316 | struct fname * old = fname; | 316 | struct fname *old = fname; |
317 | fname = fname->next; | 317 | fname = fname->next; |
318 | kfree (old); | 318 | kfree(old); |
319 | } | 319 | } while (fname); |
320 | 320 | ||
321 | *root = RB_ROOT; | 321 | *root = RB_ROOT; |
322 | } | 322 | } |