summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 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);
}
OpenPOWER on IntegriCloud