summaryrefslogtreecommitdiff
path: root/fs/f2fs/gc.c
diff options
context:
space:
mode:
authorGu Zheng <guz.fnst@cn.fujitsu.com>2013-10-22 10:52:26 +0400
committerJaegeuk Kim <jaegeuk.kim@samsung.com>2013-10-22 15:16:02 +0400
commit7bd59381c82defe19875284c48b1ac9dacd16e8f (patch)
tree872cece782fc04b77b220060022f43d08886090b /fs/f2fs/gc.c
parent435f2a1b58ac8f50894f23549c97791085f7cba2 (diff)
downloadlinux-7bd59381c82defe19875284c48b1ac9dacd16e8f.tar.xz
f2fs: introduce f2fs_kmem_cache_alloc to hide the unfailed, kmem cache allocation
Introduce the unfailed version of kmem_cache_alloc named f2fs_kmem_cache_alloc to hide the retry routine and make the code a bit cleaner. v2: Fix the wrong use of 'retry' tag pointed out by Gao feng. Use more neat code to remove redundant tag suggested by Haicheng Li. Signed-off-by: Gu Zheng <guz.fnst@cn.fujitsu.com> Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/gc.c')
-rw-r--r--fs/f2fs/gc.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index fbad96846c7c..7914b92a6967 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -361,12 +361,8 @@ static void add_gc_inode(struct inode *inode, struct list_head *ilist)
iput(inode);
return;
}
-repeat:
- new_ie = kmem_cache_alloc(winode_slab, GFP_NOFS);
- if (!new_ie) {
- cond_resched();
- goto repeat;
- }
+
+ new_ie = f2fs_kmem_cache_alloc(winode_slab, GFP_NOFS);
new_ie->inode = inode;
list_add_tail(&new_ie->list, ilist);
}