From: Chao Yu Date: Wed, 4 May 2016 15:19:46 +0000 (+0800) Subject: f2fs: remove unneeded memset when updating xattr X-Git-Tag: v4.7-rc1~84^2~33 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e3bc808ca869f0070d438257e4085602636498da;p=thirdparty%2Fkernel%2Flinux.git f2fs: remove unneeded memset when updating xattr Each of fields in struct f2fs_xattr_entry will be assigned later, so previously we don't need to memset the struct. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim --- diff --git a/fs/f2fs/xattr.c b/fs/f2fs/xattr.c index 152971243ad84..55c69d3d2ce38 100644 --- a/fs/f2fs/xattr.c +++ b/fs/f2fs/xattr.c @@ -528,7 +528,6 @@ static int __f2fs_setxattr(struct inode *inode, int index, * Before we come here, old entry is removed. * We just write new entry. */ - memset(last, 0, newsize); last->e_name_index = index; last->e_name_len = len; memcpy(last->e_name, name, len);