diff options
Diffstat (limited to 'fs/xfs/xfs_inode.c')
| -rw-r--r-- | fs/xfs/xfs_inode.c | 34 | 
1 files changed, 17 insertions, 17 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c index d354ea2b74f9..5808abab786c 100644 --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c @@ -777,7 +777,7 @@ xfs_inode_inherit_flags2(   */  int  xfs_init_new_inode( -	struct user_namespace	*mnt_userns, +	struct mnt_idmap	*idmap,  	struct xfs_trans	*tp,  	struct xfs_inode	*pip,  	xfs_ino_t		ino, @@ -823,11 +823,11 @@ xfs_init_new_inode(  	ip->i_projid = prid;  	if (dir && !(dir->i_mode & S_ISGID) && xfs_has_grpid(mp)) { -		inode_fsuid_set(inode, mnt_userns); +		inode_fsuid_set(inode, idmap);  		inode->i_gid = dir->i_gid;  		inode->i_mode = mode;  	} else { -		inode_init_owner(mnt_userns, inode, dir, mode); +		inode_init_owner(idmap, inode, dir, mode);  	}  	/* @@ -836,7 +836,7 @@ xfs_init_new_inode(  	 * (and only if the irix_sgid_inherit compatibility variable is set).  	 */  	if (irix_sgid_inherit && (inode->i_mode & S_ISGID) && -	    !vfsgid_in_group_p(i_gid_into_vfsgid(mnt_userns, inode))) +	    !vfsgid_in_group_p(i_gid_into_vfsgid(idmap, inode)))  		inode->i_mode &= ~S_ISGID;  	ip->i_disk_size = 0; @@ -946,7 +946,7 @@ xfs_bumplink(  int  xfs_create( -	struct user_namespace	*mnt_userns, +	struct mnt_idmap	*idmap,  	xfs_inode_t		*dp,  	struct xfs_name		*name,  	umode_t			mode, @@ -978,8 +978,8 @@ xfs_create(  	/*  	 * Make sure that we have allocated dquot(s) on disk.  	 */ -	error = xfs_qm_vop_dqalloc(dp, mapped_fsuid(mnt_userns, &init_user_ns), -			mapped_fsgid(mnt_userns, &init_user_ns), prid, +	error = xfs_qm_vop_dqalloc(dp, mapped_fsuid(idmap, &init_user_ns), +			mapped_fsgid(idmap, &init_user_ns), prid,  			XFS_QMOPT_QUOTALL | XFS_QMOPT_INHERIT,  			&udqp, &gdqp, &pdqp);  	if (error) @@ -1020,7 +1020,7 @@ xfs_create(  	 */  	error = xfs_dialloc(&tp, dp->i_ino, mode, &ino);  	if (!error) -		error = xfs_init_new_inode(mnt_userns, tp, dp, ino, mode, +		error = xfs_init_new_inode(idmap, tp, dp, ino, mode,  				is_dir ? 2 : 1, rdev, prid, init_xattrs, &ip);  	if (error)  		goto out_trans_cancel; @@ -1102,7 +1102,7 @@ xfs_create(  int  xfs_create_tmpfile( -	struct user_namespace	*mnt_userns, +	struct mnt_idmap	*idmap,  	struct xfs_inode	*dp,  	umode_t			mode,  	struct xfs_inode	**ipp) @@ -1127,8 +1127,8 @@ xfs_create_tmpfile(  	/*  	 * Make sure that we have allocated dquot(s) on disk.  	 */ -	error = xfs_qm_vop_dqalloc(dp, mapped_fsuid(mnt_userns, &init_user_ns), -			mapped_fsgid(mnt_userns, &init_user_ns), prid, +	error = xfs_qm_vop_dqalloc(dp, mapped_fsuid(idmap, &init_user_ns), +			mapped_fsgid(idmap, &init_user_ns), prid,  			XFS_QMOPT_QUOTALL | XFS_QMOPT_INHERIT,  			&udqp, &gdqp, &pdqp);  	if (error) @@ -1144,7 +1144,7 @@ xfs_create_tmpfile(  	error = xfs_dialloc(&tp, dp->i_ino, mode, &ino);  	if (!error) -		error = xfs_init_new_inode(mnt_userns, tp, dp, ino, mode, +		error = xfs_init_new_inode(idmap, tp, dp, ino, mode,  				0, 0, prid, false, &ip);  	if (error)  		goto out_trans_cancel; @@ -1367,7 +1367,7 @@ xfs_itruncate_extents_flags(  	unmap_len = XFS_MAX_FILEOFF - first_unmap_block + 1;  	while (unmap_len > 0) { -		ASSERT(tp->t_firstblock == NULLFSBLOCK); +		ASSERT(tp->t_highest_agno == NULLAGNUMBER);  		error = __xfs_bunmapi(tp, ip, first_unmap_block, &unmap_len,  				flags, XFS_ITRUNC_MAX_EXTENTS);  		if (error) @@ -2709,7 +2709,7 @@ out_trans_abort:   */  static int  xfs_rename_alloc_whiteout( -	struct user_namespace	*mnt_userns, +	struct mnt_idmap	*idmap,  	struct xfs_name		*src_name,  	struct xfs_inode	*dp,  	struct xfs_inode	**wip) @@ -2718,7 +2718,7 @@ xfs_rename_alloc_whiteout(  	struct qstr		name;  	int			error; -	error = xfs_create_tmpfile(mnt_userns, dp, S_IFCHR | WHITEOUT_MODE, +	error = xfs_create_tmpfile(idmap, dp, S_IFCHR | WHITEOUT_MODE,  				   &tmpfile);  	if (error)  		return error; @@ -2750,7 +2750,7 @@ xfs_rename_alloc_whiteout(   */  int  xfs_rename( -	struct user_namespace	*mnt_userns, +	struct mnt_idmap	*idmap,  	struct xfs_inode	*src_dp,  	struct xfs_name		*src_name,  	struct xfs_inode	*src_ip, @@ -2782,7 +2782,7 @@ xfs_rename(  	 * appropriately.  	 */  	if (flags & RENAME_WHITEOUT) { -		error = xfs_rename_alloc_whiteout(mnt_userns, src_name, +		error = xfs_rename_alloc_whiteout(idmap, src_name,  						  target_dp, &wip);  		if (error)  			return error;  |