aboutsummaryrefslogtreecommitdiff
path: root/e2fsck/pass3.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2005-03-20 20:05:22 -0500
committerTheodore Ts'o <tytso@mit.edu>2005-03-20 20:05:22 -0500
commit030970ed750b6a169c32ffb8b19bce3150198629 (patch)
treeb02d1738b6786d0d9c2bbf2f246a2f8eb31ab2c4 /e2fsck/pass3.c
parentea822eeba373bd0bed6e58a35ce123a9f2768113 (diff)
downloade2fsprogs-030970ed750b6a169c32ffb8b19bce3150198629.tar.gz
Fix e2fsck, debugfs, and the ext2fs_mkdir function so that when we create
a new inode we make sure that the extra information in the inode (any extra fields in a large inode and any ea-in-inode information) is cleared. This can happen when e2fsck creates a new root inode or a new lost+found directory, or when the user uses the debugfs write, mknod, or mkdir commands. Otherwise, the newly create inode could inherit garbage (or old EA information) from a previously deleted inode.
Diffstat (limited to 'e2fsck/pass3.c')
-rw-r--r--e2fsck/pass3.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/e2fsck/pass3.c b/e2fsck/pass3.c
index 6ae87a4f..a92c8904 100644
--- a/e2fsck/pass3.c
+++ b/e2fsck/pass3.c
@@ -230,7 +230,7 @@ static void check_root(e2fsck_t ctx)
/*
* Write out the inode.
*/
- pctx.errcode = ext2fs_write_inode(fs, EXT2_ROOT_INO, &inode);
+ pctx.errcode = ext2fs_write_new_inode(fs, EXT2_ROOT_INO, &inode);
if (pctx.errcode) {
pctx.str = "ext2fs_write_inode";
fix_problem(ctx, PR_3_CREATE_ROOT_ERROR, &pctx);
@@ -478,7 +478,7 @@ ext2_ino_t e2fsck_get_lost_and_found(e2fsck_t ctx, int fix)
/*
* Next, write out the inode.
*/
- pctx.errcode = ext2fs_write_inode(fs, ino, &inode);
+ pctx.errcode = ext2fs_write_new_inode(fs, ino, &inode);
if (pctx.errcode) {
pctx.str = "ext2fs_write_inode";
fix_problem(ctx, PR_3_CREATE_LPF_ERROR, &pctx);