f2fs: remove unneeded memset when updating xattr
authorChao Yu <yuchao0@huawei.com>
Wed, 4 May 2016 15:19:46 +0000 (23:19 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Sat, 7 May 2016 17:32:28 +0000 (10:32 -0700)
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 <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/xattr.c

index 152971243ad84eb0bd1a4d08f59df3020b793675..55c69d3d2ce38f4531435755766a23ccf137bb66 100644 (file)
@@ -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);