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
This commit is contained in:
parent
8b75db9857
commit
56026a89e6
1 changed files with 6 additions and 2 deletions
|
@ -221,6 +221,7 @@ static struct dentry *__sdcardfs_lookup(struct dentry *dentry,
|
||||||
struct dentry *lower_dentry;
|
struct dentry *lower_dentry;
|
||||||
const struct qstr *name;
|
const struct qstr *name;
|
||||||
struct path lower_path;
|
struct path lower_path;
|
||||||
|
struct qstr dname;
|
||||||
struct sdcardfs_sb_info *sbi;
|
struct sdcardfs_sb_info *sbi;
|
||||||
|
|
||||||
sbi = SDCARDFS_SB(dentry->d_sb);
|
sbi = SDCARDFS_SB(dentry->d_sb);
|
||||||
|
@ -306,11 +307,14 @@ static struct dentry *__sdcardfs_lookup(struct dentry *dentry,
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
/* instatiate a new negative dentry */
|
/* 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)
|
if (lower_dentry)
|
||||||
goto setup_lower;
|
goto setup_lower;
|
||||||
|
|
||||||
lower_dentry = d_alloc(lower_dir_dentry, name);
|
lower_dentry = d_alloc(lower_dir_dentry, &dname);
|
||||||
if (!lower_dentry) {
|
if (!lower_dentry) {
|
||||||
err = -ENOMEM;
|
err = -ENOMEM;
|
||||||
goto out;
|
goto out;
|
||||||
|
|
Loading…
Add table
Reference in a new issue