lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sat, 2 Mar 2013 12:40:50 +0900 From: Namjae Jeon <linkinjeon@...il.com> To: jaegeuk.kim@...sung.com Cc: linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org, linux-f2fs-devel@...ts.sourceforge.net, Namjae Jeon <linkinjeon@...il.com>, Namjae Jeon <namjae.jeon@...sung.com>, Amit Sahrawat <a.sahrawat@...sung.com> Subject: [PATCH 2/5] f2fs: optimize and change return path in lookup_free_nid_list From: Namjae Jeon <namjae.jeon@...sung.com> Optimize and change return path in lookup_free_nid_list Signed-off-by: Namjae Jeon <namjae.jeon@...sung.com> Signed-off-by: Amit Sahrawat <a.sahrawat@...sung.com> --- fs/f2fs/node.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index e275218..e24f747 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -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) { struct list_head *this; - struct free_nid *i = NULL; + struct free_nid *i; list_for_each(this, head) { i = list_entry(this, struct free_nid, list); if (i->nid == n) - break; - i = NULL; + return i; } - return i; + return NULL; } static void __del_from_free_nid_list(struct free_nid *i) -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists