Re: [PATCH 8/8] nfs: make sillyrename an async operation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 15 Sep 2010 09:37:21 -0400
Jeff Layton <jlayton@xxxxxxxxxx> wrote:

> On Wed, 15 Sep 2010 09:24:01 -0400
> Jeff Layton <jlayton@xxxxxxxxxx> wrote:
> 
> > +/**
> > + * nfs_async_rename - perform an asynchronous rename operation
> > + * @old_dir: directory that currently holds the dentry to be renamed
> > + * @new_dir: target directory for the rename
> > + * @old_dentry: original dentry to be renamed
> > + * @new_dentry: dentry to which the old_dentry should be renamed
> > + */
> > +static struct rpc_task *
> > +nfs_async_rename(struct inode *old_dir, struct inode *new_dir,
> > +		 struct dentry *old_dentry, struct dentry *new_dentry)
> > +{
> > +	int error;
> > +	struct nfs_renamedata *data;
> > +	struct rpc_message msg = { };
> > +	struct rpc_task_setup task_setup_data = {
> > +		.rpc_message = &msg,
> > +		.callback_ops = &nfs_rename_ops,
> > +		.workqueue = nfsiod_workqueue,
> > +		.rpc_client = NFS_CLIENT(old_dir),
> > +		.flags = RPC_TASK_ASYNC,
> > +	};
> > +	struct rpc_task *task;
> > +
> > +	data = kzalloc(sizeof(*data), GFP_KERNEL);
> > +	if (data == NULL)
> > +		return ERR_PTR(-ENOMEM);
> > +	task_setup_data.callback_data = data,
> > +
> > +	data->cred = rpc_lookup_cred();
> > +	if (IS_ERR(data->cred)) {
> > +		kfree(data);
> > +		return (struct rpc_task *)data->cred;
> > +	}
> > +	msg.rpc_argp = &data->args,
> > +	msg.rpc_resp = &data->res,
> 				^^^
> Eek! Just noticed the commas at the EOL in this patch. Not quite sure
> how this compiled, but I'll fix, retest and resend. Review of the rest
> of the patch would be appreciated though.
> 

Ahh, false alarm. It's legit if a little weird:

    http://en.wikipedia.org/wiki/Comma_operator

Regardless, I've done some other cleanups too so I'll resend the set
after I retest it.

Sorry for the noise...
-- 
Jeff Layton <jlayton@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux