nfsd: fix using the correct variable for sizeof()
[sfrench/cifs-2.6.git] / fs / nfsd / nfs4layouts.c
index 6d1b5bb051c566fa5f3f864e468b541302c15c07..2c05692a9abf1a45944bbe94da635317be24dadb 100644 (file)
@@ -422,7 +422,7 @@ nfsd4_insert_layout(struct nfsd4_layoutget *lgp, struct nfs4_layout_stateid *ls)
        new = kmem_cache_alloc(nfs4_layout_cache, GFP_KERNEL);
        if (!new)
                return nfserr_jukebox;
-       memcpy(&new->lo_seg, seg, sizeof(lp->lo_seg));
+       memcpy(&new->lo_seg, seg, sizeof(new->lo_seg));
        new->lo_state = ls;
 
        spin_lock(&fp->fi_lock);