diff options
author | Daniel Xu <dxu@dxuuu.xyz> | 2020-03-12 13:03:15 -0700 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2020-03-16 15:53:47 -0400 |
commit | a46a22955bae16fc5a756af7188d3ccb25c3f797 (patch) | |
tree | c1a356cde80b186783225a8cb2d8f56f9474c1b3 /include | |
parent | fdc85222d58eb6e19ac11181024ac766b19dc470 (diff) | |
download | lwn-a46a22955bae16fc5a756af7188d3ccb25c3f797.tar.gz lwn-a46a22955bae16fc5a756af7188d3ccb25c3f797.zip |
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/xattr.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/xattr.h b/include/linux/xattr.h index 6dad031be3c2..4cf6e11f4a3c 100644 --- a/include/linux/xattr.h +++ b/include/linux/xattr.h @@ -102,7 +102,8 @@ struct simple_xattr *simple_xattr_alloc(const void *value, size_t size); int simple_xattr_get(struct simple_xattrs *xattrs, const char *name, void *buffer, size_t size); int simple_xattr_set(struct simple_xattrs *xattrs, const char *name, - const void *value, size_t size, int flags); + const void *value, size_t size, int flags, + ssize_t *removed_size); ssize_t simple_xattr_list(struct inode *inode, struct simple_xattrs *xattrs, char *buffer, size_t size); void simple_xattr_list_add(struct simple_xattrs *xattrs, |