xfs_symlink.c (f2d40141d5d90b882e2c35b226f9244a63b82b6e) | xfs_symlink.c (c14329d39f2daa8132e1bbe5cc531da387bcf44a) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Copyright (c) 2000-2006 Silicon Graphics, Inc. 4 * Copyright (c) 2012-2013 Red Hat, Inc. 5 * All rights reserved. 6 */ 7#include "xfs.h" 8#include "xfs_shared.h" --- 137 unchanged lines hidden (view full) --- 146xfs_symlink( 147 struct mnt_idmap *idmap, 148 struct xfs_inode *dp, 149 struct xfs_name *link_name, 150 const char *target_path, 151 umode_t mode, 152 struct xfs_inode **ipp) 153{ | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Copyright (c) 2000-2006 Silicon Graphics, Inc. 4 * Copyright (c) 2012-2013 Red Hat, Inc. 5 * All rights reserved. 6 */ 7#include "xfs.h" 8#include "xfs_shared.h" --- 137 unchanged lines hidden (view full) --- 146xfs_symlink( 147 struct mnt_idmap *idmap, 148 struct xfs_inode *dp, 149 struct xfs_name *link_name, 150 const char *target_path, 151 umode_t mode, 152 struct xfs_inode **ipp) 153{ |
154 struct user_namespace *mnt_userns = mnt_idmap_owner(idmap); | |
155 struct xfs_mount *mp = dp->i_mount; 156 struct xfs_trans *tp = NULL; 157 struct xfs_inode *ip = NULL; 158 int error = 0; 159 int pathlen; 160 bool unlock_dp_on_error = false; 161 xfs_fileoff_t first_fsb; 162 xfs_filblks_t fs_blocks; --- 26 unchanged lines hidden (view full) --- 189 return -ENAMETOOLONG; 190 ASSERT(pathlen > 0); 191 192 prid = xfs_get_initial_prid(dp); 193 194 /* 195 * Make sure that we have allocated dquot(s) on disk. 196 */ | 154 struct xfs_mount *mp = dp->i_mount; 155 struct xfs_trans *tp = NULL; 156 struct xfs_inode *ip = NULL; 157 int error = 0; 158 int pathlen; 159 bool unlock_dp_on_error = false; 160 xfs_fileoff_t first_fsb; 161 xfs_filblks_t fs_blocks; --- 26 unchanged lines hidden (view full) --- 188 return -ENAMETOOLONG; 189 ASSERT(pathlen > 0); 190 191 prid = xfs_get_initial_prid(dp); 192 193 /* 194 * Make sure that we have allocated dquot(s) on disk. 195 */ |
197 error = xfs_qm_vop_dqalloc(dp, mapped_fsuid(mnt_userns, &init_user_ns), 198 mapped_fsgid(mnt_userns, &init_user_ns), prid, | 196 error = xfs_qm_vop_dqalloc(dp, mapped_fsuid(idmap, &init_user_ns), 197 mapped_fsgid(idmap, &init_user_ns), prid, |
199 XFS_QMOPT_QUOTALL | XFS_QMOPT_INHERIT, 200 &udqp, &gdqp, &pdqp); 201 if (error) 202 return error; 203 204 /* 205 * The symlink will fit into the inode data fork? 206 * There can't be any attributes so we get the whole variable part. --- 307 unchanged lines hidden --- | 198 XFS_QMOPT_QUOTALL | XFS_QMOPT_INHERIT, 199 &udqp, &gdqp, &pdqp); 200 if (error) 201 return error; 202 203 /* 204 * The symlink will fit into the inode data fork? 205 * There can't be any attributes so we get the whole variable part. --- 307 unchanged lines hidden --- |