Fix the return value of read_link for ext2

This commit is contained in:
Qingsong Chen 2025-05-21 04:34:15 +00:00 committed by Tate, Hongliang Tian
parent d4872af3c7
commit 189daa2e09

View File

@ -651,7 +651,7 @@ impl Inode {
pub fn read_link(&self) -> Result<String> {
if self.type_ != InodeType::SymLink {
return_errno!(Errno::EISDIR);
return_errno_with_message!(Errno::EINVAL, "self is not symlink");
}
let inner = self.inner.read();