nfsd: fix using the correct variable for sizeof()
[ Upstream commit 4fc5f5346592cdc91689455d83885b0af65d71b8 ] 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: Jakob Koschel <jakobkoschel@gmail.com> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
c4ed3e405e
commit
58137c0ba5
1 changed files with 1 additions and 1 deletions
|
@ -421,7 +421,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);
|
||||
|
|
Loading…
Add table
Reference in a new issue