Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1579037

Re: [PATCH 05/60] staging: lustre: llite: check request != NULL in ll_migrate

From James Simmons <jsimmons@infradead.org>
Newsgroups linux.kernel
Subject Re: [PATCH 05/60] staging: lustre: llite: check request != NULL in ll_migrate
Date 2017-02-11 18:20 +0100
Message-ID <t9Jv3-3qG-9@gated-at.bofh.it> (permalink)
References <t4Lea-8ik-3@gated-at.bofh.it> <t4LnR-8lZ-55@gated-at.bofh.it> <t5its-3q1-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


> On Sat, Jan 28, 2017 at 07:04:33PM -0500, James Simmons wrote:
> > From: wang di <di.wang@intel.com>
> > 
> > Check if the request is NULL, before retrieve reply body
> > from the request.
> > 
> > Signed-off-by: wang di <di.wang@intel.com>
> > Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7396
> > Reviewed-on: http://review.whamcloud.com/17079
> > Reviewed-by: John L. Hammond <john.hammond@intel.com>
> > Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
> > Signed-off-by: James Simmons <jsimmons@infradead.org>
> > ---
> >  drivers/staging/lustre/lustre/llite/file.c | 41 +++++++++++++++++-------------
> >  1 file changed, 23 insertions(+), 18 deletions(-)
> > 
> > diff --git a/drivers/staging/lustre/lustre/llite/file.c b/drivers/staging/lustre/lustre/llite/file.c
> > index a1e51a5..b681e15 100644
> > --- a/drivers/staging/lustre/lustre/llite/file.c
> > +++ b/drivers/staging/lustre/lustre/llite/file.c
> > @@ -2656,28 +2656,33 @@ int ll_migrate(struct inode *parent, struct file *file, int mdtidx,
> >  	if (!rc)
> >  		ll_update_times(request, parent);
> >  
> 
> I don't like how we return a non-NULL request on many error paths.  It
> would be simpler to understand if mdc_rename() freed request on error.
> So mdc_reint() fails but we still continue?  I don't understand that but
> there are no comments about it.
> 
> 
> > -	body = req_capsule_server_get(&request->rq_pill, &RMF_MDT_BODY);
> > -	if (!body) {
> > -		rc = -EPROTO;
> > -		goto out_free;
> > -	}
> > +	if (request) {
> > +		body = req_capsule_server_get(&request->rq_pill, &RMF_MDT_BODY);
> > +		if (!body) {
> > +			rc = -EPROTO;
> > +			goto out_free;
> 
> We should call ptlrpc_req_finished(request) before returning on this
> path.

Their are more patches coming that fix the issues you pointed out. Its 
just I have been pushing patches that are order independent first. I
will push out the patches to address other issues with ll_migrate().

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH 05/60] staging: lustre: llite: check request != NULL in  ll_migrate James Simmons <jsimmons@infradead.org> - 2017-02-11 18:20 +0100

csiph-web