Re: [PATCH v4 01/11] nfsd: fix initial getattr on write delegation

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

 



On Fri, Sep 06, 2024 at 10:08:29AM -0400, Jeff Layton wrote:
> On Thu, 2024-09-05 at 08:41 -0400, Jeff Layton wrote:
> > diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
> > index df69dc6af467..db90677fc016 100644
> > --- a/fs/nfsd/nfs4state.c
> > +++ b/fs/nfsd/nfs4state.c
> > @@ -5914,6 +5914,26 @@ static void nfsd4_open_deleg_none_ext(struct nfsd4_open *open, int status)
> >  	}
> >  }
> >  
> > +static bool
> > +nfs4_delegation_stat(struct nfs4_delegation *dp, struct svc_fh *currentfh,
> > +		     struct kstat *stat)
> > +{
> > +	struct nfsd_file *nf = find_rw_file(dp->dl_stid.sc_file);
> > +	struct path path;
> > +
> > +	if (!nf)
> > +		return false;
> > +
> > +	path.mnt = currentfh->fh_export->ex_path.mnt;
> > +	path.dentry = file_dentry(nf->nf_file);
> > +
> > +	if (vfs_getattr(&path, stat,
> > +			(STATX_INO | STATX_SIZE | STATX_CTIME | STATX_CHANGE_COOKIE),
> 
> Minor oversight here.
> 
> I added STATX_INO when I was debugging, but we don't need it here. We
> should probably drop that flag (though it's mostly harmless). Chuck,
> would you be ok with fixing that up?

Fixed and squashed into nfsd-next.

-- 
Chuck Lever




[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