Change size of the directory -> disk_inode.size

Co-Authored-By: Wang Runji <wangrunji0408@163.com>
master
Tianyu Gao 6 years ago committed by GitHub
parent ab5ae3a447
commit cc4f258ad4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -453,7 +453,7 @@ impl vfs::INode for INodeImpl {
inode: self.id, inode: self.id,
size: match disk_inode.type_ { size: match disk_inode.type_ {
FileType::File | FileType::SymLink => disk_inode.size as usize, FileType::File | FileType::SymLink => disk_inode.size as usize,
FileType::Dir => disk_inode.blocks as usize, FileType::Dir => disk_inode.size as usize,
FileType::CharDevice => 0, FileType::CharDevice => 0,
FileType::BlockDevice => 0, FileType::BlockDevice => 0,
_ => panic!("Unknown file type"), _ => panic!("Unknown file type"),

Loading…
Cancel
Save