Add size check in `InodeDesc::is_fast_symlink`
This commit is contained in:
parent
57c7546db0
commit
3cb457b620
|
|
@ -2647,7 +2647,9 @@ impl InodeDesc {
|
|||
///
|
||||
/// Reference: <https://elixir.bootlin.com/linux/v6.18/source/fs/ext2/inode.c#L48-L55>.
|
||||
fn is_fast_symlink(&self) -> bool {
|
||||
self.type_ == InodeType::SymLink && self.data_sectors() == 0
|
||||
self.type_ == InodeType::SymLink
|
||||
&& self.data_sectors() == 0
|
||||
&& self.size <= MAX_FAST_SYMLINK_LEN
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue