diff options
author | Daniel Rosenberg <drosen@google.com> | 2017-04-20 18:05:02 -0700 |
---|---|---|
committer | Amit Pundir <amit.pundir@linaro.org> | 2017-05-15 16:04:51 +0530 |
commit | fca102df52fe0d9b11cc24bb785e59a5b0bafc00 (patch) | |
tree | 04cebc1a3eb5b1815a2105fd2714b34b912b6b10 | |
parent | 4bd72fe2bce311c5def0a1c0b63486ec1a655483 (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 3ac40fead490..4eb2f19e84d0 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; |