diff options
author | Daniel Rosenberg <drosen@google.com> | 2017-04-20 18:05:02 -0700 |
---|---|---|
committer | Amit Pundir <amit.pundir@linaro.org> | 2017-05-01 15:28:32 +0530 |
commit | 9b2a5cdae059228e8039c0a779c4b77006b79438 (patch) | |
tree | 1862a6756cc914c93a940f213ae190a4646f4b6e | |
parent | 1b8e8e800bd46c829d9a416a9b61630aef8d484f (diff) |
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: Daniel Rosenberg <drosen@google.com>
Change-Id: I32d1ba304d728e0ca2648cacfb4c2e441ae63608
-rw-r--r-- | fs/sdcardfs/lookup.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/sdcardfs/lookup.c b/fs/sdcardfs/lookup.c index a0f221501b4c..446ef4027ebc 100644 --- a/fs/sdcardfs/lookup.c +++ b/fs/sdcardfs/lookup.c @@ -366,8 +366,13 @@ put_name: /* instatiate a new negative dentry */ dname.name = name->name; dname.len = name->len; - dname.hash = full_name_hash(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; |