Commit 3aa770a9 authored by Namjae Jeon's avatar Namjae Jeon Committed by Jaegeuk Kim

f2fs: optimize and change return path in lookup_free_nid_list

Optimize and change return path in lookup_free_nid_list
Signed-off-by: default avatarNamjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: default avatarAmit Sahrawat <a.sahrawat@samsung.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk.kim@samsung.com>
parent e0f56cb4
...@@ -1195,14 +1195,13 @@ const struct address_space_operations f2fs_node_aops = { ...@@ -1195,14 +1195,13 @@ const struct address_space_operations f2fs_node_aops = {
static struct free_nid *__lookup_free_nid_list(nid_t n, struct list_head *head) static struct free_nid *__lookup_free_nid_list(nid_t n, struct list_head *head)
{ {
struct list_head *this; struct list_head *this;
struct free_nid *i = NULL; struct free_nid *i;
list_for_each(this, head) { list_for_each(this, head) {
i = list_entry(this, struct free_nid, list); i = list_entry(this, struct free_nid, list);
if (i->nid == n) if (i->nid == n)
break;
i = NULL;
}
return i; return i;
}
return NULL;
} }
static void __del_from_free_nid_list(struct free_nid *i) static void __del_from_free_nid_list(struct free_nid *i)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment