Commit 4fc5f534 authored by Jakob Koschel's avatar Jakob Koschel Committed by Chuck Lever
Browse files

nfsd: fix using the correct variable for sizeof()



While the original code is valid, it is not the obvious choice for the
sizeof() call and in preparation to limit the scope of the list iterator
variable the sizeof should be changed to the size of the destination.

Signed-off-by: default avatarJakob Koschel <jakobkoschel@gmail.com>
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
parent 4e1b04af
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);