diff options
author | Theodore Ts'o <tytso@mit.edu> | 2005-03-20 20:05:22 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2005-03-20 20:05:22 -0500 |
commit | 030970ed750b6a169c32ffb8b19bce3150198629 (patch) | |
tree | b02d1738b6786d0d9c2bbf2f246a2f8eb31ab2c4 /lib/ext2fs/mkdir.c | |
parent | ea822eeba373bd0bed6e58a35ce123a9f2768113 (diff) | |
download | e2fsprogs-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 'lib/ext2fs/mkdir.c')
-rw-r--r-- | lib/ext2fs/mkdir.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ext2fs/mkdir.c b/lib/ext2fs/mkdir.c index b9129e3c..81e7aea5 100644 --- a/lib/ext2fs/mkdir.c +++ b/lib/ext2fs/mkdir.c @@ -94,7 +94,7 @@ errcode_t ext2fs_mkdir(ext2_filsys fs, ext2_ino_t parent, ext2_ino_t inum, retval = ext2fs_write_dir_block(fs, blk, block); if (retval) goto cleanup; - retval = ext2fs_write_inode(fs, ino, &inode); + retval = ext2fs_write_new_inode(fs, ino, &inode); if (retval) goto cleanup; |