Revert "Android: sdcardfs: Don't do d_add for lower fs"
This reverts commit e92f72194d
.
This change caused issues for sdcardfs on top of vfat
Signed-off-by: Daniel Rosenberg <drosen@google.com>
Change-Id: Ife2ac6d9af40e4ddb95b7261e1dad4d7817e3779
This commit is contained in:
parent
0ed8679d0d
commit
53491d9412
1 changed files with 7 additions and 5 deletions
|
@ -368,15 +368,17 @@ put_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, &dname);
|
||||
if (!lower_dentry) {
|
||||
/* We called vfs_path_lookup earlier, and did not get a negative
|
||||
* dentry then. Don't confuse the lower filesystem by forcing one
|
||||
* on it now...
|
||||
*/
|
||||
err = -ENOENT;
|
||||
err = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
d_add(lower_dentry, NULL); /* instantiate and hash */
|
||||
|
||||
setup_lower:
|
||||
lower_path.dentry = lower_dentry;
|
||||
lower_path.mnt = mntget(lower_dir_mnt);
|
||||
sdcardfs_set_lower_path(dentry, &lower_path);
|
||||
|
|
Loading…
Add table
Reference in a new issue