Skip to contentSkip to conversation

nilfs2: fix missing initialization of i_dir_start_lookup member

PATCH New Ryusuke Konishi 1 participant 1 message Sep 28, 2009 NILFS2 filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nilfs2: fix missing initialization of i_dir_start_lookup member

This corrects another missing initialization bug found in on-memory inode objects. Fortunately, this does not cause crucial failures. I'll send this upstream along with the previous fix.

Thanks,
Ryusuke Konishi
--
From: Ryusuke Konishi <[email protected]>

nilfs2: fix missing initialization of i_dir_start_lookup member

The i_dir_start_lookup field in nilfs_inode_info objects should be cleared when the objects are allocated, but the the initialization was missing in case of reading from disk. This adds the initialization.

Since the variable just gives a start page on directory lookups, the bug was nonfatal until now.

---
 fs/nilfs2/inode.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
fs/nilfs2/inode.c +1 -0
index 2d2c501..5040220 100644
@@ -400,6 +400,7 @@ int nilfs_read_inode_common(struct inode *inode,
 	ii->i_dir_acl = S_ISREG(inode->i_mode) ?
 		0 : le32_to_cpu(raw_inode->i_dir_acl);
 #endif
+	ii->i_dir_start_lookup = 0;
 	ii->i_cno = 0;
 	inode->i_generation = le32_to_cpu(raw_inode->i_generation);