Set to true only on error free path. Signed-off-by: Benny Halevy <bhalevy@xxxxxxxxxx> --- fs/nfsd/nfs4pnfsd.c | 1 + fs/nfsd/nfs4proc.c | 2 +- 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/fs/nfsd/nfs4pnfsd.c b/fs/nfsd/nfs4pnfsd.c index 0a8d5b5..11bccdf 100644 --- a/fs/nfsd/nfs4pnfsd.c +++ b/fs/nfsd/nfs4pnfsd.c @@ -892,6 +892,7 @@ struct super_block * struct nfs4_layout *lp, *nextlp; dprintk("%s: clp %p fp %p\n", __func__, clp, fp); + lrp->lrs_present = 1; spin_lock(&layout_lock); list_for_each_entry_safe (lp, nextlp, &fp->fi_layouts, lo_perfile) { dprintk("%s: lp %p client %p,%p lo_type %x,%x iomode %d,%d\n", diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index 6328300..e76111c 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c @@ -1299,7 +1299,7 @@ static __be32 nfsd4_do_lookupp(struct svc_rqst *rqstp, struct svc_fh *fh) /* Set clientid from sessionid */ copy_clientid((clientid_t *)&lrp->args.lr_seg.clientid, cstate->session); - lrp->lrs_present = (lrp->args.lr_return_type == RETURN_FILE); + lrp->lrs_present = 0; status = nfs4_pnfs_return_layout(sb, current_fh, lrp); out: dprintk("pNFS %s: status %d return_type 0x%x lrs_present %d\n", -- 1.7.6.5 -- 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