Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 60de7358 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "sdcardfs: Fix a case where sdcardfs may fail to create a file"

parents a4fdef9f 69e29d1c
Loading
Loading
Loading
Loading
+3 −8
Original line number Diff line number Diff line
@@ -369,18 +369,13 @@ static struct dentry *__sdcardfs_lookup(struct dentry *dentry,
	/* See if the low-level filesystem might want
	 * to use its own hash
	 */
	lower_dentry = d_hash_and_lookup(lower_dir_dentry, &dname);
	lower_dentry = lookup_one_len_unlocked(dname.name, lower_dir_dentry,
					       dname.len);
	if (IS_ERR(lower_dentry))
		return lower_dentry;

	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...
		 */
	if (d_really_is_negative(lower_dentry))
		err = -ENOENT;
		goto out;
	}

	lower_path.dentry = lower_dentry;
	lower_path.mnt = mntget(lower_dir_mnt);