From 7dda6587abc7c7ba372db6b1bf5816701ff01e8b Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Mon, 14 Sep 2020 11:15:25 -0700 Subject: [PATCH] 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 Cc: Paul Lawrence Cc: Sandeep Patil Change-Id: I6b1e51ba24ba35b15821c856b0d8ebb860a8f8cb Signed-off-by: Eric Biggers --- fs/ext4/namei.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index 45abe5bfcd2f..6fb7e8ad0533 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;