diff options
author | Namjae Jeon <namjae.jeon@samsung.com> | 2013-03-01 22:40:50 -0500 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-03-18 08:00:35 -0400 |
commit | 3aa770a9c9d077283b1aa07e8549a4fdc41fc5ed (patch) | |
tree | c4c0c5f6795f3d3679cec0b820a34089efb682a6 /fs/f2fs | |
parent | e0f56cb44b05abacb6aa8fa8695c28431e84b7a0 (diff) |
f2fs: optimize and change return path in lookup_free_nid_list
Optimize and change return path in lookup_free_nid_list
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/node.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 58f7216993c7..6006e8e8a5f3 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c | |||
@@ -1195,14 +1195,13 @@ const struct address_space_operations f2fs_node_aops = { | |||
1195 | static struct free_nid *__lookup_free_nid_list(nid_t n, struct list_head *head) | 1195 | static struct free_nid *__lookup_free_nid_list(nid_t n, struct list_head *head) |
1196 | { | 1196 | { |
1197 | struct list_head *this; | 1197 | struct list_head *this; |
1198 | struct free_nid *i = NULL; | 1198 | struct free_nid *i; |
1199 | list_for_each(this, head) { | 1199 | list_for_each(this, head) { |
1200 | i = list_entry(this, struct free_nid, list); | 1200 | i = list_entry(this, struct free_nid, list); |
1201 | if (i->nid == n) | 1201 | if (i->nid == n) |
1202 | break; | 1202 | return i; |
1203 | i = NULL; | ||
1204 | } | 1203 | } |
1205 | return i; | 1204 | return NULL; |
1206 | } | 1205 | } |
1207 | 1206 | ||
1208 | static void __del_from_free_nid_list(struct free_nid *i) | 1207 | static void __del_from_free_nid_list(struct free_nid *i) |