diff options
Diffstat (limited to 'fs/ext4/ioctl.c')
| -rw-r--r-- | fs/ext4/ioctl.c | 20 | 
1 files changed, 10 insertions, 10 deletions
diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c index 8067ccda34e4..b0dc7212694e 100644 --- a/fs/ext4/ioctl.c +++ b/fs/ext4/ioctl.c @@ -358,12 +358,12 @@ void ext4_reset_inode_seed(struct inode *inode)   * important fields of the inodes.   *   * @sb:         the super block of the filesystem - * @mnt_userns:	user namespace of the mount the inode was found from + * @idmap:	idmap of the mount the inode was found from   * @inode:      the inode to swap with EXT4_BOOT_LOADER_INO   *   */  static long swap_inode_boot_loader(struct super_block *sb, -				struct user_namespace *mnt_userns, +				struct mnt_idmap *idmap,  				struct inode *inode)  {  	handle_t *handle; @@ -393,7 +393,7 @@ static long swap_inode_boot_loader(struct super_block *sb,  	}  	if (IS_RDONLY(inode) || IS_APPEND(inode) || IS_IMMUTABLE(inode) || -	    !inode_owner_or_capable(mnt_userns, inode) || +	    !inode_owner_or_capable(idmap, inode) ||  	    !capable(CAP_SYS_ADMIN)) {  		err = -EPERM;  		goto journal_err_out; @@ -979,7 +979,7 @@ int ext4_fileattr_get(struct dentry *dentry, struct fileattr *fa)  	return 0;  } -int ext4_fileattr_set(struct user_namespace *mnt_userns, +int ext4_fileattr_set(struct mnt_idmap *idmap,  		      struct dentry *dentry, struct fileattr *fa)  {  	struct inode *inode = d_inode(dentry); @@ -1217,7 +1217,7 @@ static long __ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)  {  	struct inode *inode = file_inode(filp);  	struct super_block *sb = inode->i_sb; -	struct user_namespace *mnt_userns = file_mnt_user_ns(filp); +	struct mnt_idmap *idmap = file_mnt_idmap(filp);  	ext4_debug("cmd = %u, arg = %lu\n", cmd, arg); @@ -1234,7 +1234,7 @@ static long __ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)  		__u32 generation;  		int err; -		if (!inode_owner_or_capable(mnt_userns, inode)) +		if (!inode_owner_or_capable(idmap, inode))  			return -EPERM;  		if (ext4_has_metadata_csum(inode->i_sb)) { @@ -1376,7 +1376,7 @@ mext_out:  	case EXT4_IOC_MIGRATE:  	{  		int err; -		if (!inode_owner_or_capable(mnt_userns, inode)) +		if (!inode_owner_or_capable(idmap, inode))  			return -EACCES;  		err = mnt_want_write_file(filp); @@ -1398,7 +1398,7 @@ mext_out:  	case EXT4_IOC_ALLOC_DA_BLKS:  	{  		int err; -		if (!inode_owner_or_capable(mnt_userns, inode)) +		if (!inode_owner_or_capable(idmap, inode))  			return -EACCES;  		err = mnt_want_write_file(filp); @@ -1417,7 +1417,7 @@ mext_out:  		err = mnt_want_write_file(filp);  		if (err)  			return err; -		err = swap_inode_boot_loader(sb, mnt_userns, inode); +		err = swap_inode_boot_loader(sb, idmap, inode);  		mnt_drop_write_file(filp);  		return err;  	} @@ -1542,7 +1542,7 @@ resizefs_out:  	case EXT4_IOC_CLEAR_ES_CACHE:  	{ -		if (!inode_owner_or_capable(mnt_userns, inode)) +		if (!inode_owner_or_capable(idmap, inode))  			return -EACCES;  		ext4_clear_inode_es(inode);  		return 0;  |