diff options
| author | Julian Sun <sunjunchao@bytedance.com> | 2025-10-10 17:52:57 +0800 |
|---|---|---|
| committer | Theodore Ts'o <tytso@mit.edu> | 2025-11-06 10:32:33 -0500 |
| commit | ce3236a3c7d8e048e0bcc7f445f12f911dd9dc7d (patch) | |
| tree | 5984a4fa30f389675736ee6a2d2ec12e297a9bb3 | |
| parent | 6146a0f1dfae5d37442a9ddcba012add260bceb0 (diff) | |
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>
| -rw-r--r-- | fs/ext4/hash.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/hash.c b/fs/ext4/hash.c index 33cd5b6b02d5..48483cd015d3 100644 --- a/fs/ext4/hash.c +++ b/fs/ext4/hash.c @@ -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); |
