ANDROID: Incremental fs: fix memdup.cocci warnings
PATCH 1/1 ANDROID: Incremental fs: fix memdup.cocci warnings
From: kbuild test robot <[email protected]>
Use kmemdup rather than duplicating its implementation
Generated by: scripts/coccinelle/api/memdup.cocci
Fixes 2dbb0451810f ("ANDROID: Incremental fs: Support xattrs")
Signed-off-by kbuild test robot <[email protected]>
Signed-off-by Julia Lawall <[email protected]>
---
tree: https://android.googlesource.com/kernel/common android-mainline head: 2dbb0451810f9e63c61e974cbc490f3b75384b63 commit: 2dbb0451810f9e63c61e974cbc490f3b75384b63 [1/1] ANDROID: Incremental fs: Support xattrs
:::::: branch date: 9 hours ago
:::::: commit date: 9 hours ago
vfs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
fs/incfs/vfs.c +1 -2
@@ -2118,11 +2118,10 @@ static ssize_t incfs_setxattr(struct den }kfree (*stored_value); - *stored_value =kzalloc (size,GFP_NOFS ); + *stored_value =kmemdup (value, size,GFP_NOFS );if (!*stored_value)return -ENOMEM ; -memcpy (*stored_value, value, size); *stored_size = size;return 0 ; }