Re: [PATCH] Replace NFS4ERR_NOTEMPY with NFS4ERR_EXIST

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

 



On Wed, Mar 18, 2009 at 09:55:47AM +0800, Ni Wenjuan wrote:
> Ni Wenjuan 写道:
> > Fix a test in rename operation. rename dir1 into existing,nonempty dir2 should
> > return  NFS4ERR_EXIST instead got NFS4ERR_NOTEMPTY. RFC says if the target is a
> > directory but not empty, the server will return the error, NFS4ERR_EXIST.
> > 
> > Signed-off-by:Ni Wenjuan  <niwj@xxxxxxxxxxxxxx>
> > 
> > ---
> >  fs/nfsd/nfs4proc.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
> > index 9fa60a3..c1e2e22 100644
> > --- a/fs/nfsd/nfs4proc.c
> > +++ b/fs/nfsd/nfs4proc.c
> > @@ -605,7 +605,7 @@ nfsd4_rename(struct svc_rqst *rqstp, struct
> > nfsd4_compound_state *cstate,
> > 
> >  	/* the underlying filesystem returns different error's than required
> >  	 * by NFSv4. both save_fh and current_fh have been verified.. */
> > -	if (status == nfserr_isdir)
> > +	if (status == nfserr_isdir || status == nfserr_notempty)
> >  		status = nfserr_exist;
> >  	else if ((status == nfserr_notdir) &&
> >                    (S_ISDIR(cstate->save_fh.fh_dentry->d_inode->i_mode) &&
> 
> Bruce ,do you think this patch is ok ?   Can it be accepted?

OK.  Did you already post this patch?  Sorry, I can't seem to find it.
Could you repost in the standard format?

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