gc.c (769ec6e5b7d4a8115447736871be8bffaaba3a7d) | gc.c (9be32d72becca41d7d9b010d7d9be1d39489414f) |
---|---|
1/* 2 * fs/f2fs/gc.c 3 * 4 * Copyright (c) 2012 Samsung Electronics Co., Ltd. 5 * http://www.samsung.com/ 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License version 2 as --- 342 unchanged lines hidden (view full) --- 351static void add_gc_inode(struct gc_inode_list *gc_list, struct inode *inode) 352{ 353 struct inode_entry *new_ie; 354 355 if (inode == find_gc_inode(gc_list, inode->i_ino)) { 356 iput(inode); 357 return; 358 } | 1/* 2 * fs/f2fs/gc.c 3 * 4 * Copyright (c) 2012 Samsung Electronics Co., Ltd. 5 * http://www.samsung.com/ 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License version 2 as --- 342 unchanged lines hidden (view full) --- 351static void add_gc_inode(struct gc_inode_list *gc_list, struct inode *inode) 352{ 353 struct inode_entry *new_ie; 354 355 if (inode == find_gc_inode(gc_list, inode->i_ino)) { 356 iput(inode); 357 return; 358 } |
359retry: | |
360 new_ie = f2fs_kmem_cache_alloc(winode_slab, GFP_NOFS); 361 new_ie->inode = inode; | 359 new_ie = f2fs_kmem_cache_alloc(winode_slab, GFP_NOFS); 360 new_ie->inode = inode; |
362 | 361retry: |
363 if (radix_tree_insert(&gc_list->iroot, inode->i_ino, new_ie)) { | 362 if (radix_tree_insert(&gc_list->iroot, inode->i_ino, new_ie)) { |
364 kmem_cache_free(winode_slab, new_ie); | 363 cond_resched(); |
365 goto retry; 366 } 367 list_add_tail(&new_ie->list, &gc_list->ilist); 368} 369 370static void put_gc_inode(struct gc_inode_list *gc_list) 371{ 372 struct inode_entry *ie, *next_ie; --- 395 unchanged lines hidden --- | 364 goto retry; 365 } 366 list_add_tail(&new_ie->list, &gc_list->ilist); 367} 368 369static void put_gc_inode(struct gc_inode_list *gc_list) 370{ 371 struct inode_entry *ie, *next_ie; --- 395 unchanged lines hidden --- |