diff options
author | Pedro F. Giffuni <pfg@FreeBSD.org> | 2016-01-24 02:25:41 +0000 |
---|---|---|
committer | Pedro F. Giffuni <pfg@FreeBSD.org> | 2016-01-24 02:25:41 +0000 |
commit | e08ad8f06818f2cb3e040c7d06a0e89ff0cf91c9 (patch) | |
tree | 6e9dcc9dfbead7052c9ab00df9f242d0d88d5003 /sys/fs | |
parent | 7b40c6df952b103533041fe72db42cf417a1a572 (diff) | |
download | src-e08ad8f06818f2cb3e040c7d06a0e89ff0cf91c9.tar.gz src-e08ad8f06818f2cb3e040c7d06a0e89ff0cf91c9.zip |
ext2: Initialize i_flag after allocation.
We use i_flag to carry some flags like IN_E4INDEX which newer
ext2fs variants uses internally.
fsck.ext3 rightfully complains after our implementation tags
non-directory inodes with INDEX_FL.
Initializing i_flag during allocation removes the noise factor
and quiets down fsck.
Patch from: Damjan Jovanovic
PR: 206530
Notes
Notes:
svn path=/head/; revision=294652
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/ext2fs/ext2_alloc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/fs/ext2fs/ext2_alloc.c b/sys/fs/ext2fs/ext2_alloc.c index 935cb0caedac..12067d2a9b2a 100644 --- a/sys/fs/ext2fs/ext2_alloc.c +++ b/sys/fs/ext2fs/ext2_alloc.c @@ -393,6 +393,7 @@ ext2_valloc(struct vnode *pvp, int mode, struct ucred *cred, struct vnode **vpp) * Linux doesn't read the old inode in when it is allocating a * new one. I will set at least i_size and i_blocks to zero. */ + ip->i_flag = 0; ip->i_size = 0; ip->i_blocks = 0; ip->i_mode = 0; |