diff options
author | Jakob Koschel <jakobkoschel@gmail.com> | 2022-03-19 21:27:04 +0100 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2022-03-20 12:49:38 -0400 |
commit | 4fc5f5346592cdc91689455d83885b0af65d71b8 (patch) | |
tree | f78a5aa2b22adb5dab5083d13175d72e284f15a9 /fs/nfsd | |
parent | 4e1b04af4fe6679e63d1bc09f750424882ab701c (diff) |
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: Jakob Koschel <jakobkoschel@gmail.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'fs/nfsd')
-rw-r--r-- | fs/nfsd/nfs4layouts.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4layouts.c b/fs/nfsd/nfs4layouts.c index 6d1b5bb051c5..2c05692a9abf 100644 --- a/fs/nfsd/nfs4layouts.c +++ b/fs/nfsd/nfs4layouts.c @@ -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); |