kernfs: Add removed_size out param for simple_xattr_set
This helps set up size accounting in the next commit. Without this out param, it's difficult to find out the removed xattr size without taking a lock for longer and walking the xattr linked list twice. Signed-off-by: Daniel Xu <dxu@dxuuu.xyz> Acked-by: Chris Down <chris@chrisdown.name> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
@@ -303,7 +303,7 @@ int kernfs_xattr_set(struct kernfs_node *kn, const char *name,
|
||||
if (!attrs)
|
||||
return -ENOMEM;
|
||||
|
||||
return simple_xattr_set(&attrs->xattrs, name, value, size, flags);
|
||||
return simple_xattr_set(&attrs->xattrs, name, value, size, flags, NULL);
|
||||
}
|
||||
|
||||
static int kernfs_vfs_xattr_get(const struct xattr_handler *handler,
|
||||
|
Reference in New Issue
Block a user