Changeset View
Changeset View
Standalone View
Standalone View
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
Show First 20 Lines • Show All 1,794 Lines • ▼ Show 20 Lines | if ((error = zfs_acl_ids_create(dzp, 0, vap, | ||||
goto out; | goto out; | ||||
if (zfs_acl_ids_overquota(zfsvfs, &acl_ids)) { | if (zfs_acl_ids_overquota(zfsvfs, &acl_ids)) { | ||||
zfs_acl_ids_free(&acl_ids); | zfs_acl_ids_free(&acl_ids); | ||||
error = SET_ERROR(EDQUOT); | error = SET_ERROR(EDQUOT); | ||||
goto out; | goto out; | ||||
} | } | ||||
getnewvnode_reserve(1); | getnewvnode_reserve(); | ||||
tx = dmu_tx_create(os); | tx = dmu_tx_create(os); | ||||
dmu_tx_hold_sa_create(tx, acl_ids.z_aclp->z_acl_bytes + | dmu_tx_hold_sa_create(tx, acl_ids.z_aclp->z_acl_bytes + | ||||
ZFS_SA_BASE_ATTR_SIZE); | ZFS_SA_BASE_ATTR_SIZE); | ||||
fuid_dirtied = zfsvfs->z_fuid_dirty; | fuid_dirtied = zfsvfs->z_fuid_dirty; | ||||
if (fuid_dirtied) | if (fuid_dirtied) | ||||
▲ Show 20 Lines • Show All 275 Lines • ▼ Show 20 Lines | if (zfs_acl_ids_overquota(zfsvfs, &acl_ids)) { | ||||
zfs_acl_ids_free(&acl_ids); | zfs_acl_ids_free(&acl_ids); | ||||
ZFS_EXIT(zfsvfs); | ZFS_EXIT(zfsvfs); | ||||
return (SET_ERROR(EDQUOT)); | return (SET_ERROR(EDQUOT)); | ||||
} | } | ||||
/* | /* | ||||
* Add a new entry to the directory. | * Add a new entry to the directory. | ||||
*/ | */ | ||||
getnewvnode_reserve(1); | getnewvnode_reserve(); | ||||
tx = dmu_tx_create(zfsvfs->z_os); | tx = dmu_tx_create(zfsvfs->z_os); | ||||
dmu_tx_hold_zap(tx, dzp->z_id, TRUE, dirname); | dmu_tx_hold_zap(tx, dzp->z_id, TRUE, dirname); | ||||
dmu_tx_hold_zap(tx, DMU_NEW_OBJECT, FALSE, NULL); | dmu_tx_hold_zap(tx, DMU_NEW_OBJECT, FALSE, NULL); | ||||
fuid_dirtied = zfsvfs->z_fuid_dirty; | fuid_dirtied = zfsvfs->z_fuid_dirty; | ||||
if (fuid_dirtied) | if (fuid_dirtied) | ||||
zfs_fuid_txhold(zfsvfs, tx); | zfs_fuid_txhold(zfsvfs, tx); | ||||
if (!zfsvfs->z_use_sa && acl_ids.z_aclp->z_acl_bytes > ZFS_ACE_SPACE) { | if (!zfsvfs->z_use_sa && acl_ids.z_aclp->z_acl_bytes > ZFS_ACE_SPACE) { | ||||
dmu_tx_hold_write(tx, DMU_NEW_OBJECT, 0, | dmu_tx_hold_write(tx, DMU_NEW_OBJECT, 0, | ||||
▲ Show 20 Lines • Show All 1,894 Lines • ▼ Show 20 Lines | zfs_symlink(vnode_t *dvp, vnode_t **vpp, char *name, vattr_t *vap, char *link, | ||||
} | } | ||||
if (zfs_acl_ids_overquota(zfsvfs, &acl_ids)) { | if (zfs_acl_ids_overquota(zfsvfs, &acl_ids)) { | ||||
zfs_acl_ids_free(&acl_ids); | zfs_acl_ids_free(&acl_ids); | ||||
ZFS_EXIT(zfsvfs); | ZFS_EXIT(zfsvfs); | ||||
return (SET_ERROR(EDQUOT)); | return (SET_ERROR(EDQUOT)); | ||||
} | } | ||||
getnewvnode_reserve(1); | getnewvnode_reserve(); | ||||
tx = dmu_tx_create(zfsvfs->z_os); | tx = dmu_tx_create(zfsvfs->z_os); | ||||
fuid_dirtied = zfsvfs->z_fuid_dirty; | fuid_dirtied = zfsvfs->z_fuid_dirty; | ||||
dmu_tx_hold_write(tx, DMU_NEW_OBJECT, 0, MAX(1, len)); | dmu_tx_hold_write(tx, DMU_NEW_OBJECT, 0, MAX(1, len)); | ||||
dmu_tx_hold_zap(tx, dzp->z_id, TRUE, name); | dmu_tx_hold_zap(tx, dzp->z_id, TRUE, name); | ||||
dmu_tx_hold_sa_create(tx, acl_ids.z_aclp->z_acl_bytes + | dmu_tx_hold_sa_create(tx, acl_ids.z_aclp->z_acl_bytes + | ||||
ZFS_SA_BASE_ATTR_SIZE + len); | ZFS_SA_BASE_ATTR_SIZE + len); | ||||
dmu_tx_hold_sa(tx, dzp->z_sa_hdl, B_FALSE); | dmu_tx_hold_sa(tx, dzp->z_sa_hdl, B_FALSE); | ||||
if (!zfsvfs->z_use_sa && acl_ids.z_aclp->z_acl_bytes > ZFS_ACE_SPACE) { | if (!zfsvfs->z_use_sa && acl_ids.z_aclp->z_acl_bytes > ZFS_ACE_SPACE) { | ||||
▲ Show 20 Lines • Show All 2,013 Lines • Show Last 20 Lines |