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>
This commit is contained in:
Andrew Morton 2014-01-23 15:56:13 -08:00 коммит произвёл Linus Torvalds
Родитель b1c8047c6b
Коммит ed8f68669a
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -312,11 +312,11 @@ static void free_rb_tree_fname(struct rb_root *root)
struct fname *fname, *next;
rbtree_postorder_for_each_entry_safe(fname, next, root, rb_hash)
while (fname) {
struct fname * old = fname;
do {
struct fname *old = fname;
fname = fname->next;
kfree (old);
}
kfree(old);
} while (fname);
*root = RB_ROOT;
}