diff options
| author | Daniel Rosenberg <drosen@google.com> | 2017-02-14 20:47:17 -0800 |
|---|---|---|
| committer | Arvin Quilao <arquilao@gmail.com> | 2017-03-07 04:06:49 +0000 |
| commit | 7e7c2fe7ff43c776dda1f10563872ed25d167666 (patch) | |
| tree | 4e5c41950daf61064d1bc9735aa312bebc8fc47f | |
| parent | bfc6ec2416065977c3ed9d56240035bf3a07a4e6 (diff) | |
ANDROID: sdcardfs: Fix incorrect hash
This adds back the hash calculation removed as part of
the previous patch, as it is in fact necessary.
Signed-off-by: Daniel Rosenberg <drosen@google.com>
Bug: 35307857
Change-Id: Ie607332bcf2c5d2efdf924e4060ef3f576bf25dc
| -rwxr-xr-x | fs/sdcardfs/lookup.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/sdcardfs/lookup.c b/fs/sdcardfs/lookup.c index 3a2558b7463..87b47e34d80 100755 --- a/fs/sdcardfs/lookup.c +++ b/fs/sdcardfs/lookup.c @@ -221,6 +221,7 @@ static struct dentry *__sdcardfs_lookup(struct dentry *dentry, struct dentry *lower_dentry; const struct qstr *name; struct path lower_path; + struct qstr dname; struct sdcardfs_sb_info *sbi; sbi = SDCARDFS_SB(dentry->d_sb); @@ -306,11 +307,14 @@ static struct dentry *__sdcardfs_lookup(struct dentry *dentry, goto out; /* instatiate a new negative dentry */ - lower_dentry = d_lookup(lower_dir_dentry, name); + 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); if (lower_dentry) goto setup_lower; - lower_dentry = d_alloc(lower_dir_dentry, name); + lower_dentry = d_alloc(lower_dir_dentry, &dname); if (!lower_dentry) { err = -ENOMEM; goto out; |
