Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cac7ba91 authored by Daniel Rosenberg's avatar Daniel Rosenberg
Browse files

ANDROID: sdcardfs: Use filesystem specific hash



We weren't accounting for FS specific hash functions,
causing us to miss negative dentries for any FS that
had one.

Similar to a patch from esdfs
commit 75bd25a9476d ("esdfs: support lower's own hash")

Signed-off-by: default avatarDaniel Rosenberg <drosen@google.com>
Change-Id: I32d1ba304d728e0ca2648cacfb4c2e441ae63608
parent 875e5267
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -366,8 +366,13 @@ static struct dentry *__sdcardfs_lookup(struct dentry *dentry,
	/* instatiate a new negative dentry */
	dname.name = name->name;
	dname.len = name->len;
	dname.hash = full_name_hash(lower_dir_dentry, dname.name, dname.len);
	lower_dentry = d_lookup(lower_dir_dentry, &dname);

	/* See if the low-level filesystem might want
	 * to use its own hash
	 */
	lower_dentry = d_hash_and_lookup(lower_dir_dentry, &dname);
	if (IS_ERR(lower_dentry))
		return lower_dentry;
	if (lower_dentry)
		goto setup_lower;