diff options
author | Miles Bader <miles@gnu.org> | 1995-04-25 01:10:40 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1995-04-25 01:10:40 +0000 |
commit | 806cc284ef99f1657d61eae66c51c291d690ce84 (patch) | |
tree | eb71a0f9865f300a99e67b810b22de3becab51c3 /ext2fs/inode.c | |
parent | bc2f6e7ea67ffa01c09f5f7dc87f40d454bd4d37 (diff) |
Formerly inode.c.~17~
Diffstat (limited to 'ext2fs/inode.c')
-rw-r--r-- | ext2fs/inode.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/ext2fs/inode.c b/ext2fs/inode.c index b7119ce0..3103c410 100644 --- a/ext2fs/inode.c +++ b/ext2fs/inode.c @@ -339,6 +339,9 @@ write_node (struct node *np) di->i_blocks = st->st_blocks >> log2_stat_blocks_per_fs_block; di->i_flags = st->st_flags; + /* Set dtime non-zero to indicate a deleted file. */ + di->i_dtime = (st->st_mode ? 0 : di->i_mtime); + if (S_ISCHR(st->st_mode) || S_ISBLK(st->st_mode)) di->i_block[0] = st->st_rdev; else @@ -350,7 +353,7 @@ write_node (struct node *np) diskfs_end_catch_exception (); np->dn_stat_dirty = 0; - pokel_add (&np->dn->pokel, di, sizeof (struct ext2_inode)); + record_global_poke (di); } } @@ -433,16 +436,18 @@ diskfs_set_translator (struct node *np, char *name, unsigned namelen, } di->i_translator = blkno; - pokel_add (&np->dn->pokel, di, sizeof (struct ext2_inode)); + record_global_poke (di); + np->dn_stat.st_blocks += 1 << log2_stat_blocks_per_fs_block; np->dn_set_ctime = 1; } else if (!namelen && blkno) { /* Clear block for translator going away. */ - ext2_free_blocks (blkno, 1); di->i_translator = 0; - pokel_add (&np->dn->pokel, di, sizeof (struct ext2_inode)); + record_global_poke (di); + ext2_free_blocks (blkno, 1); + np->dn_stat.st_blocks -= 1 << log2_stat_blocks_per_fs_block; np->istranslated = 0; np->dn_set_ctime = 1; |