Lines Matching refs:data
32 nfs_free_unlinkdata(struct nfs_unlinkdata *data) in nfs_free_unlinkdata() argument
34 put_cred(data->cred); in nfs_free_unlinkdata()
35 kfree(data->args.name.name); in nfs_free_unlinkdata()
36 kfree(data); in nfs_free_unlinkdata()
48 struct nfs_unlinkdata *data = calldata; in nfs_async_unlink_done() local
49 struct inode *dir = d_inode(data->dentry->d_parent); in nfs_async_unlink_done()
51 trace_nfs_sillyrename_unlink(data, task->tk_status); in nfs_async_unlink_done()
65 struct nfs_unlinkdata *data = calldata; in nfs_async_unlink_release() local
66 struct dentry *dentry = data->dentry; in nfs_async_unlink_release()
71 nfs_free_unlinkdata(data); in nfs_async_unlink_release()
78 struct nfs_unlinkdata *data = calldata; in nfs_unlink_prepare() local
79 struct inode *dir = d_inode(data->dentry->d_parent); in nfs_unlink_prepare()
80 NFS_PROTO(dir)->unlink_rpc_prepare(task, data); in nfs_unlink_prepare()
89 static void nfs_do_call_unlink(struct inode *inode, struct nfs_unlinkdata *data) in nfs_do_call_unlink() argument
92 .rpc_argp = &data->args, in nfs_do_call_unlink()
93 .rpc_resp = &data->res, in nfs_do_call_unlink()
94 .rpc_cred = data->cred, in nfs_do_call_unlink()
99 .callback_data = data, in nfs_do_call_unlink()
104 struct inode *dir = d_inode(data->dentry->d_parent); in nfs_do_call_unlink()
106 data->args.fh = NFS_FH(dir); in nfs_do_call_unlink()
107 nfs_fattr_init(data->res.dir_attr); in nfs_do_call_unlink()
109 NFS_PROTO(dir)->unlink_setup(&msg, data->dentry, inode); in nfs_do_call_unlink()
117 static int nfs_call_unlink(struct dentry *dentry, struct inode *inode, struct nfs_unlinkdata *data) in nfs_call_unlink() argument
123 alias = d_alloc_parallel(dentry->d_parent, &data->args.name, &data->wq); in nfs_call_unlink()
140 alias->d_fsdata = data; in nfs_call_unlink()
156 data->dentry = alias; in nfs_call_unlink()
157 nfs_do_call_unlink(inode, data); in nfs_call_unlink()
169 struct nfs_unlinkdata *data; in nfs_async_unlink() local
173 data = kzalloc(sizeof(*data), GFP_KERNEL); in nfs_async_unlink()
174 if (data == NULL) in nfs_async_unlink()
176 data->args.name.name = kstrdup(name->name, GFP_KERNEL); in nfs_async_unlink()
177 if (!data->args.name.name) in nfs_async_unlink()
179 data->args.name.len = name->len; in nfs_async_unlink()
181 data->cred = get_current_cred(); in nfs_async_unlink()
182 data->res.dir_attr = &data->dir_attr; in nfs_async_unlink()
183 init_waitqueue_head(&data->wq); in nfs_async_unlink()
191 dentry->d_fsdata = data; in nfs_async_unlink()
202 put_cred(data->cred); in nfs_async_unlink()
203 kfree(data->args.name.name); in nfs_async_unlink()
205 kfree(data); in nfs_async_unlink()
222 struct nfs_unlinkdata *data; in nfs_complete_unlink() local
226 data = dentry->d_fsdata; in nfs_complete_unlink()
230 if (NFS_STALE(inode) || !nfs_call_unlink(dentry, inode, data)) in nfs_complete_unlink()
231 nfs_free_unlinkdata(data); in nfs_complete_unlink()
240 struct nfs_unlinkdata *data = dentry->d_fsdata; in nfs_cancel_async_unlink() local
245 nfs_free_unlinkdata(data); in nfs_cancel_async_unlink()
260 struct nfs_renamedata *data = calldata; in nfs_async_rename_done() local
261 struct inode *old_dir = data->old_dir; in nfs_async_rename_done()
262 struct inode *new_dir = data->new_dir; in nfs_async_rename_done()
263 struct dentry *old_dentry = data->old_dentry; in nfs_async_rename_done()
266 new_dir, data->new_dentry, task->tk_status); in nfs_async_rename_done()
272 if (data->complete) in nfs_async_rename_done()
273 data->complete(task, data); in nfs_async_rename_done()
282 struct nfs_renamedata *data = calldata; in nfs_async_rename_release() local
283 struct super_block *sb = data->old_dir->i_sb; in nfs_async_rename_release()
285 if (d_really_is_positive(data->old_dentry)) in nfs_async_rename_release()
286 nfs_mark_for_revalidate(d_inode(data->old_dentry)); in nfs_async_rename_release()
290 if (data->cancelled) { in nfs_async_rename_release()
291 spin_lock(&data->old_dir->i_lock); in nfs_async_rename_release()
292 nfs_force_lookup_revalidate(data->old_dir); in nfs_async_rename_release()
293 spin_unlock(&data->old_dir->i_lock); in nfs_async_rename_release()
294 if (data->new_dir != data->old_dir) { in nfs_async_rename_release()
295 spin_lock(&data->new_dir->i_lock); in nfs_async_rename_release()
296 nfs_force_lookup_revalidate(data->new_dir); in nfs_async_rename_release()
297 spin_unlock(&data->new_dir->i_lock); in nfs_async_rename_release()
301 dput(data->old_dentry); in nfs_async_rename_release()
302 dput(data->new_dentry); in nfs_async_rename_release()
303 iput(data->old_dir); in nfs_async_rename_release()
304 iput(data->new_dir); in nfs_async_rename_release()
306 put_cred(data->cred); in nfs_async_rename_release()
307 kfree(data); in nfs_async_rename_release()
312 struct nfs_renamedata *data = calldata; in nfs_rename_prepare() local
313 NFS_PROTO(data->old_dir)->rename_rpc_prepare(task, data); in nfs_rename_prepare()
337 struct nfs_renamedata *data; in nfs_async_rename() local
347 data = kzalloc(sizeof(*data), GFP_KERNEL); in nfs_async_rename()
348 if (data == NULL) in nfs_async_rename()
350 task_setup_data.callback_data = data; in nfs_async_rename()
352 data->cred = get_current_cred(); in nfs_async_rename()
354 msg.rpc_argp = &data->args; in nfs_async_rename()
355 msg.rpc_resp = &data->res; in nfs_async_rename()
356 msg.rpc_cred = data->cred; in nfs_async_rename()
359 data->old_dir = old_dir; in nfs_async_rename()
361 data->new_dir = new_dir; in nfs_async_rename()
363 data->old_dentry = dget(old_dentry); in nfs_async_rename()
364 data->new_dentry = dget(new_dentry); in nfs_async_rename()
365 nfs_fattr_init(&data->old_fattr); in nfs_async_rename()
366 nfs_fattr_init(&data->new_fattr); in nfs_async_rename()
367 data->complete = complete; in nfs_async_rename()
370 data->args.old_dir = NFS_FH(old_dir); in nfs_async_rename()
371 data->args.old_name = &old_dentry->d_name; in nfs_async_rename()
372 data->args.new_dir = NFS_FH(new_dir); in nfs_async_rename()
373 data->args.new_name = &new_dentry->d_name; in nfs_async_rename()
376 data->res.old_fattr = &data->old_fattr; in nfs_async_rename()
377 data->res.new_fattr = &data->new_fattr; in nfs_async_rename()
381 NFS_PROTO(data->old_dir)->rename_setup(&msg, old_dentry, new_dentry); in nfs_async_rename()
391 nfs_complete_sillyrename(struct rpc_task *task, struct nfs_renamedata *data) in nfs_complete_sillyrename() argument
393 struct dentry *dentry = data->old_dentry; in nfs_complete_sillyrename()