From 781f675e2d7ec120e8c0803f88d7bf00fe3f0703 Mon Sep 17 00:00:00 2001 From: Richard Weinberger Date: Wed, 17 May 2017 10:36:46 +0200 Subject: ubifs: Fix unlink code wrt. double hash lookups When removing an encrypted file with a long name and without having the key we have to be able to locate and remove the directory entry via a double hash. This corner case was simply forgotten. Fixes: 528e3d178f25 ("ubifs: Add full hash lookup support") Reported-by: David Oberhollenzer Signed-off-by: Richard Weinberger --- fs/ubifs/ubifs.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'fs/ubifs/ubifs.h') diff --git a/fs/ubifs/ubifs.h b/fs/ubifs/ubifs.h index 998fb6eea5ac..d933edade14a 100644 --- a/fs/ubifs/ubifs.h +++ b/fs/ubifs/ubifs.h @@ -1589,6 +1589,8 @@ int ubifs_tnc_add_nm(struct ubifs_info *c, const union ubifs_key *key, int ubifs_tnc_remove(struct ubifs_info *c, const union ubifs_key *key); int ubifs_tnc_remove_nm(struct ubifs_info *c, const union ubifs_key *key, const struct fscrypt_name *nm); +int ubifs_tnc_remove_dh(struct ubifs_info *c, const union ubifs_key *key, + uint32_t cookie); int ubifs_tnc_remove_range(struct ubifs_info *c, union ubifs_key *from_key, union ubifs_key *to_key); int ubifs_tnc_remove_ino(struct ubifs_info *c, ino_t inum); -- cgit v1.2.3