diff options
author | Maksym Planeta <mcsim.planeta@gmail.com> | 2012-10-07 20:31:02 +0300 |
---|---|---|
committer | Maksym Planeta <mcsim.planeta@gmail.com> | 2012-10-28 12:33:36 +0100 |
commit | d4ea51228849e26e1d1771f9b4cfbb53f4994095 (patch) | |
tree | b60a852fea0c341279d0210173b37401c375054f | |
parent | 2cc40183b795a23b4008f24ddb322b419343dad6 (diff) |
Make sure that function read_node will not get bad data.
* ext2fs/ialloc.c (ext2_alloc_inode): Function is changed.
-rw-r--r-- | ext2fs/ialloc.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ext2fs/ialloc.c b/ext2fs/ialloc.c index eee28b82..48361cb9 100644 --- a/ext2fs/ialloc.c +++ b/ext2fs/ialloc.c @@ -268,6 +268,14 @@ repeat: spin_unlock (&global_lock); alloc_sync (0); + /* Make sure the coming read_node won't complain about bad + fields. */ + { + struct ext2_inode *di = dino_ref (inum); + memset (di, 0, sizeof *di); + dino_deref (di); + } + return inum; } |