diff options
author | bde <bde@FreeBSD.org> | 1997-12-03 16:46:21 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1997-12-03 16:46:21 +0000 |
commit | 4060d586346e71874cc8ce0771450b84d88cea41 (patch) | |
tree | b69e04a8b9d0bcf8098a7977b256a41c942f1420 | |
parent | e32f8f106f64e8fa074aab9f0522cf943d1e59db (diff) | |
download | FreeBSD-src-4060d586346e71874cc8ce0771450b84d88cea41.zip FreeBSD-src-4060d586346e71874cc8ce0771450b84d88cea41.tar.gz |
Fixed corruption of the per-group used directories count. It wasn't
decremented when directories were removed because rev.1.12 broke the
fixup of the i_mode of the inode being removed.
-rw-r--r-- | sys/gnu/ext2fs/ext2_alloc.c | 7 | ||||
-rw-r--r-- | sys/gnu/fs/ext2fs/ext2_alloc.c | 7 |
2 files changed, 8 insertions, 6 deletions
diff --git a/sys/gnu/ext2fs/ext2_alloc.c b/sys/gnu/ext2fs/ext2_alloc.c index 53409f2..cfd4ac9 100644 --- a/sys/gnu/ext2fs/ext2_alloc.c +++ b/sys/gnu/ext2fs/ext2_alloc.c @@ -515,6 +515,7 @@ ext2_vfree(pvp, ino, mode) { register struct ext2_sb_info *fs; register struct inode *pip; + register mode_t save_i_mode; pip = VTOI(pvp); fs = pip->i_e2fs; @@ -531,10 +532,10 @@ ext2_vfree(pvp, ino, mode) really like to know what the rationale behind this 'set i_mode to zero to denote an unused inode' is */ - mode = pip->i_mode; - pip->i_mode = mode; - ext2_free_inode(pip); + save_i_mode = pip->i_mode; pip->i_mode = mode; + ext2_free_inode(pip); + pip->i_mode = save_i_mode; return (0); } diff --git a/sys/gnu/fs/ext2fs/ext2_alloc.c b/sys/gnu/fs/ext2fs/ext2_alloc.c index 53409f2..cfd4ac9 100644 --- a/sys/gnu/fs/ext2fs/ext2_alloc.c +++ b/sys/gnu/fs/ext2fs/ext2_alloc.c @@ -515,6 +515,7 @@ ext2_vfree(pvp, ino, mode) { register struct ext2_sb_info *fs; register struct inode *pip; + register mode_t save_i_mode; pip = VTOI(pvp); fs = pip->i_e2fs; @@ -531,10 +532,10 @@ ext2_vfree(pvp, ino, mode) really like to know what the rationale behind this 'set i_mode to zero to denote an unused inode' is */ - mode = pip->i_mode; - pip->i_mode = mode; - ext2_free_inode(pip); + save_i_mode = pip->i_mode; pip->i_mode = mode; + ext2_free_inode(pip); + pip->i_mode = save_i_mode; return (0); } |