diff options
Diffstat (limited to 'fs/init.c')
| -rw-r--r-- | fs/init.c | 14 | 
1 files changed, 7 insertions, 7 deletions
| diff --git a/fs/init.c b/fs/init.c index 5c36adaa9b44..9684406a8416 100644 --- a/fs/init.c +++ b/fs/init.c @@ -157,7 +157,7 @@ int __init init_mknod(const char *filename, umode_t mode, unsigned int dev)  		mode &= ~current_umask();  	error = security_path_mknod(&path, dentry, mode, dev);  	if (!error) -		error = vfs_mknod(mnt_user_ns(path.mnt), path.dentry->d_inode, +		error = vfs_mknod(mnt_idmap(path.mnt), path.dentry->d_inode,  				  dentry, mode, new_decode_dev(dev));  	done_path_create(&path, dentry);  	return error; @@ -167,7 +167,7 @@ int __init init_link(const char *oldname, const char *newname)  {  	struct dentry *new_dentry;  	struct path old_path, new_path; -	struct user_namespace *mnt_userns; +	struct mnt_idmap *idmap;  	int error;  	error = kern_path(oldname, 0, &old_path); @@ -182,14 +182,14 @@ int __init init_link(const char *oldname, const char *newname)  	error = -EXDEV;  	if (old_path.mnt != new_path.mnt)  		goto out_dput; -	mnt_userns = mnt_user_ns(new_path.mnt); -	error = may_linkat(mnt_userns, &old_path); +	idmap = mnt_idmap(new_path.mnt); +	error = may_linkat(idmap, &old_path);  	if (unlikely(error))  		goto out_dput;  	error = security_path_link(old_path.dentry, &new_path, new_dentry);  	if (error)  		goto out_dput; -	error = vfs_link(old_path.dentry, mnt_userns, new_path.dentry->d_inode, +	error = vfs_link(old_path.dentry, idmap, new_path.dentry->d_inode,  			 new_dentry, NULL);  out_dput:  	done_path_create(&new_path, new_dentry); @@ -209,7 +209,7 @@ int __init init_symlink(const char *oldname, const char *newname)  		return PTR_ERR(dentry);  	error = security_path_symlink(&path, dentry, oldname);  	if (!error) -		error = vfs_symlink(mnt_user_ns(path.mnt), path.dentry->d_inode, +		error = vfs_symlink(mnt_idmap(path.mnt), path.dentry->d_inode,  				    dentry, oldname);  	done_path_create(&path, dentry);  	return error; @@ -233,7 +233,7 @@ int __init init_mkdir(const char *pathname, umode_t mode)  		mode &= ~current_umask();  	error = security_path_mkdir(&path, dentry, mode);  	if (!error) -		error = vfs_mkdir(mnt_user_ns(path.mnt), path.dentry->d_inode, +		error = vfs_mkdir(mnt_idmap(path.mnt), path.dentry->d_inode,  				  dentry, mode);  	done_path_create(&path, dentry);  	return error; | 
