Re: [PATCH 13/14] nfsd4: fix do_probe_callback errors

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

 



On Thu, Mar 12, 2009 at 12:55:42PM +0200, Benny Halevy wrote:
> On Mar. 11, 2009, 2:27 +0200, "J. Bruce Fields" <bfields@xxxxxxxxxxxx> wrote:
> > From: J. Bruce Fields <bfields@xxxxxxxxxxxxxx>
> > 
> > The errors returned aren't used.  Just return 0 and make them available
> 
> Wouldn't it be better to change the function to return void
> so justice would be seen to be done?

Yeah, but for now since this is passed to kthread_start() this is
probably needed to keep the compiler happy.

> > @@ -405,7 +403,8 @@ static int do_probe_callback(void *data)
> >  	/* Create RPC client */
> >  	client = rpc_create(&args);
> >  	if (IS_ERR(client)) {
> > -		dprintk("NFSD: couldn't create callback client\n");
> > +		dprintk("NFSD: couldn't create callback client: %d\n",
> > +			PTR_ERR(client));
> >  		status = PTR_ERR(client);
> 
> How about reversing the order and dprintk status instead of PTR_ERR(client)?

OK.

> 
> >  		goto out_err;
> >  	}
> > @@ -422,10 +421,10 @@ static int do_probe_callback(void *data)
> >  out_release_client:
> >  	rpc_shutdown_client(client);
> >  out_err:
> > -	dprintk("NFSD: warning: no callback path to client %.*s\n",
> > -		(int)clp->cl_name.len, clp->cl_name.data);
> > +	dprintk("NFSD: warning: no callback path to client %.*: error %ds\n",
> 
> seems like a typo. ": error %d" was pasted one char too soon...
> should be:
>  +	dprintk("NFSD: warning: no callback path to client %.*s: error %d\n",

Whoops, thanks.  How did that ever compile?  Oh, I see, I must have only
tested the comiple after the next patch, as it looks like I incorrectly
merged a half-fix there....

--b.
--
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