ANDROID: ext4: fix mis-merge with encrypt+casefold support
Fix a mis-merge between upstream commit 7303cb5bfe84 ("ext4: fix
checking of directory entry validity for inline directories") and
ANDROID commit 705a3e5b1852 ("ANDROID: ext4: Handle casefolding with
encryption").
Fixes: e6d1601bb0f2 ("Merge 5.9-rc2 into android-mainline")
Bug: 161184936
Cc: Daniel Rosenberg <drosen@google.com>
Cc: Paul Lawrence <paullawrence@google.com>
Cc: Sandeep Patil <sspatil@google.com>
Change-Id: I6b1e51ba24ba35b15821c856b0d8ebb860a8f8cb
Signed-off-by: Eric Biggers <ebiggers@google.com>
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index 45abe5b..6fb7e8a 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -1474,7 +1474,7 @@ int ext4_search_dir(struct buffer_head *bh, char *search_buf, int buf_size,
/* found a match - just to be sure, do
* a full check */
if (ext4_check_dir_entry(dir, NULL, de, bh, search_buf,
- bh->b_size, lblk, offset))
+ buf_size, lblk, offset))
return -1;
*res_dir = de;
return 1;