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

Commit cf748a3e authored by Todd Kjos's avatar Todd Kjos
Browse files

Revert "ANDROID: sdcardfs: Change current->fs under lock"

This reverts commit 1e6b0ff0.
parent 1e6b0ff0
Loading
Loading
Loading
Loading
+2 −13
Original line number Diff line number Diff line
@@ -96,11 +96,8 @@ static int sdcardfs_create(struct inode *dir, struct dentry *dentry,
		err = -ENOMEM;
		goto out_unlock;
	}
	copied_fs->umask = 0;
	task_lock(current);
	current->fs = copied_fs;
	task_unlock(current);

	current->fs->umask = 0;
	err = vfs_create2(lower_dentry_mnt, d_inode(lower_parent_dentry), lower_dentry, mode, want_excl);
	if (err)
		goto out;
@@ -114,9 +111,7 @@ static int sdcardfs_create(struct inode *dir, struct dentry *dentry,
	fixup_lower_ownership(dentry, dentry->d_name.name);

out:
	task_lock(current);
	current->fs = saved_fs;
	task_unlock(current);
	free_fs_struct(copied_fs);
out_unlock:
	unlock_dir(lower_parent_dentry);
@@ -254,11 +249,8 @@ static int sdcardfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode
		unlock_dir(lower_parent_dentry);
		goto out_unlock;
	}
	copied_fs->umask = 0;
	task_lock(current);
	current->fs = copied_fs;
	task_unlock(current);

	current->fs->umask = 0;
	err = vfs_mkdir2(lower_mnt, d_inode(lower_parent_dentry), lower_dentry, mode);

	if (err) {
@@ -326,10 +318,7 @@ static int sdcardfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode
		}
	}
out:
	task_lock(current);
	current->fs = saved_fs;
	task_unlock(current);

	free_fs_struct(copied_fs);
out_unlock:
	sdcardfs_put_lower_path(dentry, &lower_path);