UPSTREAM: 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.

Change-Id: I831978a8fd659665b025898c0aa3c4f364f798cf
Signed-off-by: Daniel Xu <[email protected]>
Acked-by: Chris Down <[email protected]>
Reviewed-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Tejun Heo <[email protected]>
This commit is contained in:
Daniel Xu 2020-03-12 13:03:15 -07:00 • committed by basamaryan
commit 5afd909150
No known key found for this signature in database
GPG key ID: 210D5384FB2A5885
4 changed files with 14 additions and 4 deletions

View file

@ -3203,7 +3203,7 @@ static int shmem_xattr_handler_set(const struct xattr_handler *handler,
struct shmem_inode_info *info = SHMEM_I(inode);
name = xattr_full_name(handler, name);
return simple_xattr_set(&info->xattrs, name, value, size, flags);
return simple_xattr_set(&info->xattrs, name, value, size, flags, NULL);
}
static const struct xattr_handler shmem_security_xattr_handler = {