mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 20:32:04 +09:00
Revert "Android: sdcardfs: Don't do d_add for lower fs"
This reverts commit ab16e2fd5e.
This change caused issues for sdcardfs on top of vfat
Signed-off-by: Daniel Rosenberg <drosen@google.com>
Change-Id: I34918eed57a8b566c58f8083de12a93a12ba5857
This commit is contained in:
@@ -368,15 +368,17 @@ put_name:
|
||||
dname.len = name->len;
|
||||
dname.hash = full_name_hash(lower_dir_dentry, 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);
|
||||
|
||||
Reference in New Issue
Block a user