Commit ce3236a3 authored by Julian Sun's avatar Julian Sun Committed by Theodore Ts'o
Browse files

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: default avatarJulian Sun <sunjunchao@bytedance.com>
Message-ID: <20251010095257.3008275-1-sunjunchao@bytedance.com>
Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
parent 6146a0f1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);