Lines Matching refs:op
59 static int afs_inode_init_from_status(struct afs_operation *op, in afs_inode_init_from_status() argument
69 op->type ? op->type->name : "???"); in afs_inode_init_from_status()
80 vnode->cb_v_break = op->cb_v_break; in afs_inode_init_from_status()
81 vnode->cb_s_break = op->cb_s_break; in afs_inode_init_from_status()
125 dump_vnode(vnode, op->file[0].vnode != vnode ? op->file[0].vnode : NULL); in afs_inode_init_from_status()
141 vnode->cb_server = op->server; in afs_inode_init_from_status()
152 static void afs_apply_status(struct afs_operation *op, in afs_apply_status() argument
165 op->type ? op->type->name : "???"); in afs_apply_status()
198 inode->i_ctime = op->ctime; in afs_apply_status()
211 op->type ? op->type->name : "???", in afs_apply_status()
212 op->debug_id); in afs_apply_status()
252 static void afs_apply_callback(struct afs_operation *op, in afs_apply_callback() argument
260 vnode->cb_server = op->server; in afs_apply_callback()
269 void afs_vnode_commit_status(struct afs_operation *op, struct afs_vnode_param *vp) in afs_vnode_commit_status() argument
285 op->flags &= ~AFS_OPERATION_DIR_CONFLICT; in afs_vnode_commit_status()
296 afs_apply_status(op, vp); in afs_vnode_commit_status()
298 afs_apply_callback(op, vp); in afs_vnode_commit_status()
299 } else if (vp->op_unlinked && !(op->flags & AFS_OPERATION_DIR_CONFLICT)) { in afs_vnode_commit_status()
311 afs_cache_permit(vnode, op->key, vp->cb_break_before, &vp->scb); in afs_vnode_commit_status()
314 static void afs_fetch_status_success(struct afs_operation *op) in afs_fetch_status_success() argument
316 struct afs_vnode_param *vp = &op->file[op->fetch_status.which]; in afs_fetch_status_success()
321 ret = afs_inode_init_from_status(op, vp, vnode); in afs_fetch_status_success()
322 op->error = ret; in afs_fetch_status_success()
324 afs_cache_permit(vnode, op->key, vp->cb_break_before, &vp->scb); in afs_fetch_status_success()
326 afs_vnode_commit_status(op, vp); in afs_fetch_status_success()
343 struct afs_operation *op; in afs_fetch_status() local
350 op = afs_alloc_operation(key, vnode->volume); in afs_fetch_status()
351 if (IS_ERR(op)) in afs_fetch_status()
352 return PTR_ERR(op); in afs_fetch_status()
354 afs_op_set_vnode(op, 0, vnode); in afs_fetch_status()
356 op->nr_files = 1; in afs_fetch_status()
357 op->ops = &afs_fetch_status_operation; in afs_fetch_status()
358 afs_begin_vnode_operation(op); in afs_fetch_status()
359 afs_wait_for_operation(op); in afs_fetch_status()
362 *_caller_access = op->file[0].scb.status.caller_access; in afs_fetch_status()
363 return afs_put_operation(op); in afs_fetch_status()
445 struct inode *afs_iget(struct afs_operation *op, struct afs_vnode_param *vp) in afs_iget() argument
447 struct afs_vnode_param *dvp = &op->file[0]; in afs_iget()
472 ret = afs_inode_init_from_status(op, vp, vnode); in afs_iget()
512 struct afs_operation *op; in afs_root_iget() local
532 op = afs_alloc_operation(key, as->volume); in afs_root_iget()
533 if (IS_ERR(op)) { in afs_root_iget()
534 ret = PTR_ERR(op); in afs_root_iget()
538 afs_op_set_vnode(op, 0, vnode); in afs_root_iget()
540 op->nr_files = 1; in afs_root_iget()
541 op->ops = &afs_fetch_status_operation; in afs_root_iget()
542 ret = afs_do_sync_operation(op); in afs_root_iget()
822 static void afs_setattr_success(struct afs_operation *op) in afs_setattr_success() argument
824 struct afs_vnode_param *vp = &op->file[0]; in afs_setattr_success()
828 op->setattr.old_i_size = old_i_size; in afs_setattr_success()
829 afs_vnode_commit_status(op, vp); in afs_setattr_success()
832 if (op->setattr.attr->ia_valid & ATTR_SIZE) { in afs_setattr_success()
833 loff_t size = op->setattr.attr->ia_size; in afs_setattr_success()
839 static void afs_setattr_edit_file(struct afs_operation *op) in afs_setattr_edit_file() argument
841 struct afs_vnode_param *vp = &op->file[0]; in afs_setattr_edit_file()
844 if (op->setattr.attr->ia_valid & ATTR_SIZE) { in afs_setattr_edit_file()
845 loff_t size = op->setattr.attr->ia_size; in afs_setattr_edit_file()
846 loff_t i_size = op->setattr.old_i_size; in afs_setattr_edit_file()
866 struct afs_operation *op; in afs_setattr() local
900 op = afs_alloc_operation(((attr->ia_valid & ATTR_FILE) ? in afs_setattr()
903 if (IS_ERR(op)) { in afs_setattr()
904 ret = PTR_ERR(op); in afs_setattr()
908 afs_op_set_vnode(op, 0, vnode); in afs_setattr()
909 op->setattr.attr = attr; in afs_setattr()
912 op->file[0].dv_delta = 1; in afs_setattr()
913 op->file[0].set_size = true; in afs_setattr()
915 op->ctime = attr->ia_ctime; in afs_setattr()
916 op->file[0].update_ctime = 1; in afs_setattr()
917 op->file[0].modification = true; in afs_setattr()
919 op->ops = &afs_setattr_operation; in afs_setattr()
920 ret = afs_do_sync_operation(op); in afs_setattr()