Changeset View
Changeset View
Standalone View
Standalone View
sys/fs/tmpfs/tmpfs_vnops.c
Show First 20 Lines • Show All 617 Lines • ▼ Show 20 Lines | tmpfs_read_pgcache(struct vop_read_pgcache_args *v) | ||||
if (node == NULL) | if (node == NULL) | ||||
goto out_smr; | goto out_smr; | ||||
MPASS(node->tn_type == VREG); | MPASS(node->tn_type == VREG); | ||||
MPASS(node->tn_refcount >= 1); | MPASS(node->tn_refcount >= 1); | ||||
object = node->tn_reg.tn_aobj; | object = node->tn_reg.tn_aobj; | ||||
if (object == NULL) | if (object == NULL) | ||||
goto out_smr; | goto out_smr; | ||||
MPASS((object->flags & (OBJ_ANON | OBJ_DEAD | OBJ_TMPFS_NODE)) == | MPASS(object->type == OBJT_SWAP_TMPFS); | ||||
OBJ_TMPFS_NODE); | MPASS((object->flags & (OBJ_ANON | OBJ_DEAD | OBJ_SWAP)) == | ||||
OBJ_SWAP); | |||||
if (!VN_IS_DOOMED(vp)) { | if (!VN_IS_DOOMED(vp)) { | ||||
/* size cannot become shorter due to rangelock. */ | /* size cannot become shorter due to rangelock. */ | ||||
size = node->tn_size; | size = node->tn_size; | ||||
tmpfs_set_accessed(node->tn_reg.tn_tmp, node); | tmpfs_set_accessed(node->tn_reg.tn_tmp, node); | ||||
vfs_smr_exit(); | vfs_smr_exit(); | ||||
error = uiomove_object(object, size, v->a_uio); | error = uiomove_object(object, size, v->a_uio); | ||||
return (error); | return (error); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 1,249 Lines • Show Last 20 Lines |