Message ID | 20210712152717.6480-1-ebiggers@kernel.org |
---|---|
State | New |
Headers | show |
Series | [5.4/4.19/4.14] fscrypt: don't ignore minor_hash when hash is 0 | expand |
On Mon, Jul 12, 2021 at 10:27:17AM -0500, Eric Biggers wrote: > From: Eric Biggers <ebiggers@google.com> > > commit 77f30bfcfcf484da7208affd6a9e63406420bf91 upstream. > [Please apply to 5.4-stable, 4.19-stable, and 4.14-stable.] Now queued up. Do we also need this for 4.9? thanks, greg k-h
diff --git a/fs/crypto/fname.c b/fs/crypto/fname.c index 3da3707c10e3..891328f09b3c 100644 --- a/fs/crypto/fname.c +++ b/fs/crypto/fname.c @@ -273,13 +273,8 @@ int fscrypt_fname_disk_to_usr(struct inode *inode, oname->name); return 0; } - if (hash) { - digested_name.hash = hash; - digested_name.minor_hash = minor_hash; - } else { - digested_name.hash = 0; - digested_name.minor_hash = 0; - } + digested_name.hash = hash; + digested_name.minor_hash = minor_hash; memcpy(digested_name.digest, FSCRYPT_FNAME_DIGEST(iname->name, iname->len), FSCRYPT_FNAME_DIGEST_SIZE);