[PATCH] PMFS: Initialize timestamps for new root inode

Ross Zwisler ross.zwisler at linux.intel.com
Tue Jun 4 13:39:12 EDT 2013


When creating a new PMFS filesystem, initialize the timestamps for the
new root inode.

Signed-off-by: Ross Zwisler <ross.zwisler at linux.intel.com>
---
 fs/pmfs/super.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/fs/pmfs/super.c b/fs/pmfs/super.c
index 0f4780d..1e9d040 100644
--- a/fs/pmfs/super.c
+++ b/fs/pmfs/super.c
@@ -484,6 +484,8 @@ static struct pmfs_inode *pmfs_init(struct super_block *sb,
 	root_i->i_flags = 0;
 	root_i->i_blocks = cpu_to_le32(1);
 	root_i->i_size = cpu_to_le32(sb->s_blocksize);
+	root_i->i_atime = root_i->i_mtime = root_i->i_ctime = 
+		cpu_to_le32(get_seconds());
 	root_i->root = cpu_to_le64(pmfs_get_block_off(sb, blocknr,
 						       PMFS_BLOCK_TYPE_4K));
 	root_i->height = 0;
-- 
1.7.1




More information about the Linux-pmfs mailing list