aboutsummaryrefslogtreecommitdiff
path: root/sys/gnu
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>1997-12-03 16:46:21 +0000
committerBruce Evans <bde@FreeBSD.org>1997-12-03 16:46:21 +0000
commit0f1dddfb0c993248234e8d31ed19247eb06be536 (patch)
tree16d05f280902467a81fd7d04be17edecc23f094b /sys/gnu
parent34883582bc542f859c3541e239f6205afecb62c2 (diff)
downloadsrc-0f1dddfb0c993248234e8d31ed19247eb06be536.tar.gz
src-0f1dddfb0c993248234e8d31ed19247eb06be536.zip
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.
Notes
Notes: svn path=/head/; revision=31517
Diffstat (limited to 'sys/gnu')
-rw-r--r--sys/gnu/ext2fs/ext2_alloc.c7
-rw-r--r--sys/gnu/fs/ext2fs/ext2_alloc.c7
2 files changed, 8 insertions, 6 deletions
diff --git a/sys/gnu/ext2fs/ext2_alloc.c b/sys/gnu/ext2fs/ext2_alloc.c
index 53409f2a2c2e..cfd4ac93927f 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 53409f2a2c2e..cfd4ac93927f 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);
}