diff options
| author | Daniel Rosenberg <drosen@google.com> | 2017-04-20 18:05:02 -0700 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-04-27 12:31:44 +0200 |
| commit | 5fa8257e7d1c7755f8e10e01e438b5d5cf4b330a (patch) | |
| tree | b41803af10613f95191939fe7768eb02864ed86e | |
| parent | 143dce6d053794592ea0c2021d2f59783d1e50d8 (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
| -rwxr-xr-x | 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 36f2770cb..c46d0f406 100755 --- a/fs/sdcardfs/lookup.c +++ b/fs/sdcardfs/lookup.c @@ -371,8 +371,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; |
