Commit c00e4522 authored by Xu Wang's avatar Xu Wang Committed by Ilya Dryomov

ceph: remove unnecessary cast in kfree()

Remove unnecassary casts in the argument to kfree.
Signed-off-by: default avatarXu Wang <vulab@iscas.ac.cn>
Reviewed-by: default avatarIlya Dryomov <idryomov@gmail.com>
Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
parent 042f6498
......@@ -497,10 +497,10 @@ static int __set_xattr(struct ceph_inode_info *ci,
kfree(*newxattr);
*newxattr = NULL;
if (xattr->should_free_val)
kfree((void *)xattr->val);
kfree(xattr->val);
if (update_xattr) {
kfree((void *)name);
kfree(name);
name = xattr->name;
}
ci->i_xattrs.names_size -= xattr->name_len;
......@@ -566,9 +566,9 @@ static void __free_xattr(struct ceph_inode_xattr *xattr)
BUG_ON(!xattr);
if (xattr->should_free_name)
kfree((void *)xattr->name);
kfree(xattr->name);
if (xattr->should_free_val)
kfree((void *)xattr->val);
kfree(xattr->val);
kfree(xattr);
}
......@@ -582,9 +582,9 @@ static int __remove_xattr(struct ceph_inode_info *ci,
rb_erase(&xattr->node, &ci->i_xattrs.index);
if (xattr->should_free_name)
kfree((void *)xattr->name);
kfree(xattr->name);
if (xattr->should_free_val)
kfree((void *)xattr->val);
kfree(xattr->val);
ci->i_xattrs.names_size -= xattr->name_len;
ci->i_xattrs.vals_size -= xattr->val_len;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment