mirror of https://github.com/torvalds/linux.git
ext4: make error code in __ext4fs_dirhash() consistent.
Currently __ext4fs_dirhash() returns -1 (-EPERM) if fscrypt doesn't have encryption key, which may confuse users. Make the error code here consistent with existing error code. Signed-off-by: Julian Sun <sunjunchao@bytedance.com> Message-ID: <20251010095257.3008275-1-sunjunchao@bytedance.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This commit is contained in:
parent
6146a0f1df
commit
ce3236a3c7
|
|
@ -268,7 +268,7 @@ static int __ext4fs_dirhash(const struct inode *dir, const char *name, int len,
|
|||
combined_hash = fscrypt_fname_siphash(dir, &qname);
|
||||
} else {
|
||||
ext4_warning_inode(dir, "Siphash requires key");
|
||||
return -1;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
hash = (__u32)(combined_hash >> 32);
|
||||
|
|
|
|||
Loading…
Reference in New Issue