Re: [PATCH v7 13/19] NFSD return nfs4_stid in nfs4_preprocess_stateid_op

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

 



On Wed, Oct 2, 2019 at 11:52 AM J. Bruce Fields <bfields@xxxxxxxxxxxx> wrote:
>
> On Mon, Sep 16, 2019 at 05:13:47PM -0400, Olga Kornievskaia wrote:
> > @@ -1026,7 +1026,8 @@ static __be32 nfsd4_do_lookupp(struct svc_rqst *rqstp, struct svc_fh *fh)
> >  static __be32
> >  nfsd4_verify_copy(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
> >                 stateid_t *src_stateid, struct nfsd_file **src,
> > -               stateid_t *dst_stateid, struct nfsd_file **dst)
> > +               stateid_t *dst_stateid, struct nfsd_file **dst,
> > +               struct nfs4_stid **stid)
> >  {
> >       __be32 status;
> >
> ...
> > @@ -1072,7 +1073,7 @@ static __be32 nfsd4_do_lookupp(struct svc_rqst *rqstp, struct svc_fh *fh)
> >       __be32 status;
> >
> >       status = nfsd4_verify_copy(rqstp, cstate, &clone->cl_src_stateid, &src,
> > -                                &clone->cl_dst_stateid, &dst);
> > +                                &clone->cl_dst_stateid, &dst, NULL);
> >       if (status)
> >               goto out;
> >
> > @@ -1260,7 +1261,7 @@ static int nfsd4_do_async_copy(void *data)
> >
> >       status = nfsd4_verify_copy(rqstp, cstate, &copy->cp_src_stateid,
> >                                  &copy->nf_src, &copy->cp_dst_stateid,
> > -                                &copy->nf_dst);
> > +                                &copy->nf_dst, NULL);
> >       if (status)
> >               goto out;
> >
>
> So both callers pass NULL for the new stid parameter.  Looks like that's
> still true after the full series of patches, too.
>

If you look at an earlier chunk it uses it (there is only a single
user of it: copy notify state)
@@ -1034,14 +1035,14 @@ static __be32 nfsd4_do_lookupp(struct svc_rqst
*rqstp, struct svc_fh *fh)
                return nfserr_nofilehandle;

        status = nfs4_preprocess_stateid_op(rqstp, cstate, &cstate->save_fh,
-                                           src_stateid, RD_STATE, src);
+                                           src_stateid, RD_STATE, src, NULL);
        if (status) {
                dprintk("NFSD: %s: couldn't process src stateid!\n", __func__);
                goto out;
        }

        status = nfs4_preprocess_stateid_op(rqstp, cstate, &cstate->current_fh,
-                                           dst_stateid, WR_STATE, dst);
+                                           dst_stateid, WR_STATE, dst, stid);
        if (status) {
                dprintk("NFSD: %s: couldn't process dst stateid!\n", __func__);
                goto out_put_src;

> --b.



[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