aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2011-05-02 14:04:19 -0700
committerBrian Behlendorf <[email protected]>2011-05-02 14:04:19 -0700
commit5f35b190071048f25d66db81ce9763ecd0c1760e (patch)
treebb286c8a422fd4a1ad8ba5dc77f1aa4c908e2c86
parentdf554c148ecfdfb7e597f8ab7eee71388b24a19d (diff)
Fully update inode when created
When a new znode/inode pair is created both the znode and the inode should be immediately updated to the correct values. This was done for the znode and for most of the values in the inode, but not all of them. This normally wasn't a problem because most subsequent operations would cause the inode to be immediately updated. This change ensures the inode is now fully updated before it is inserted in to the inode hash. Closes #116 Closes #146 Closes #164
-rw-r--r--module/zfs/zfs_znode.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/module/zfs/zfs_znode.c b/module/zfs/zfs_znode.c
index edfb86009..936b950f3 100644
--- a/module/zfs/zfs_znode.c
+++ b/module/zfs/zfs_znode.c
@@ -373,8 +373,7 @@ zfs_znode_alloc(zfs_sb_t *zsb, dmu_buf_t *db, int blksz,
}
ip->i_ino = obj;
- ip->i_mode = zp->z_mode;
- ip->i_mtime = ip->i_atime = ip->i_ctime = CURRENT_TIME_SEC;
+ zfs_inode_update(zp);
zfs_inode_set_ops(zsb, ip);
if (insert_inode_locked(ip))