summaryrefslogtreecommitdiff
path: root/fs/f2fs/node.c
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2014-12-31 10:08:26 +0300
committerJaegeuk Kim <jaegeuk@kernel.org>2015-01-10 04:02:26 +0300
commit3547ea961dd66a474c6f709c4f5e8a2472289df9 (patch)
tree5954b5b018bf72806283a10398e0a507c151c453 /fs/f2fs/node.c
parente1509cf294cc670cda1fedd430f0ff175c42b591 (diff)
downloadlinux-3547ea961dd66a474c6f709c4f5e8a2472289df9.tar.xz
f2fs: avoid potential unnecessary codes
This patch relocates some operations to avoid unnecessary execution. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/node.c')
-rw-r--r--fs/f2fs/node.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index a7cb0db2e3e8..9bed0161efee 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -348,7 +348,6 @@ void get_node_info(struct f2fs_sb_info *sbi, nid_t nid, struct node_info *ni)
struct nat_entry *e;
int i;
- memset(&ne, 0, sizeof(struct f2fs_nat_entry));
ni->nid = nid;
/* Check nat cache */
@@ -363,6 +362,8 @@ void get_node_info(struct f2fs_sb_info *sbi, nid_t nid, struct node_info *ni)
if (e)
return;
+ memset(&ne, 0, sizeof(struct f2fs_nat_entry));
+
/* Check current segment summary */
mutex_lock(&curseg->curseg_mutex);
i = lookup_journal_in_cursum(sum, NAT_JOURNAL, nid, 0);