Instead of passing all parameters individually, of which one was unused. Pass the structures these originate from. Signed-off-by: Boaz Harrosh <bharrosh@xxxxxxxxxxx> --- fs/nfsd/nfs4pnfsd.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/fs/nfsd/nfs4pnfsd.c b/fs/nfsd/nfs4pnfsd.c index 509b260..f0e193a 100644 --- a/fs/nfsd/nfs4pnfsd.c +++ b/fs/nfsd/nfs4pnfsd.c @@ -301,9 +301,8 @@ init_layout(struct nfs4_layout *lp, struct nfs4_layout_state *ls, struct nfs4_file *fp, struct nfs4_client *clp, - struct svc_fh *current_fh, - struct nfsd4_layout_seg *seg, - stateid_t *stateid) + struct nfsd4_pnfs_layoutget *lgp, + struct nfsd4_pnfs_layoutget_res *res) { dprintk("pNFS %s: lp %p ls %p clp %p fp %p ino %p\n", __func__, lp, ls, clp, fp, fp->fi_inode); @@ -311,10 +310,10 @@ init_layout(struct nfs4_layout *lp, get_nfs4_file(fp); lp->lo_client = clp; lp->lo_file = fp; - memcpy(&lp->lo_seg, seg, sizeof(lp->lo_seg)); + memcpy(&lp->lo_seg, &res->lg_seg, sizeof(lp->lo_seg)); get_layout_state(ls); /* put on destroy_layout */ lp->lo_state = ls; - update_layout_stateid(ls, stateid); + update_layout_stateid(ls, &lgp->lg_sid); list_add_tail(&lp->lo_perclnt, &clp->cl_layouts); list_add_tail(&lp->lo_perfile, &fp->fi_layouts); dprintk("pNFS %s end\n", __func__); @@ -829,7 +828,7 @@ nfs4_pnfs_get_layout(struct nfsd4_pnfs_layoutget *lgp, goto out_freelayout; /* Can't merge, so let's initialize this new layout */ - init_layout(lp, ls, fp, clp, lgp->lg_fhp, &res.lg_seg, &lgp->lg_sid); + init_layout(lp, ls, fp, clp, lgp, &res); out_unlock: if (ls) put_layout_state(ls); -- 1.7.10.2.677.gb6bc67f -- 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