fs: split off setxattr_copy and do_setxattr function from setxattr
authorStefan Roesch <shr@fb.com>
Mon, 25 Apr 2022 00:10:46 +0000 (18:10 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Oct 2022 08:39:44 +0000 (10:39 +0200)
commit19f4e1636626742411036a536b9950eb89611711
tree10c209798846917b8bc3fdaefab3714380116212
parenta0e3719e030a631e9148fb760a644d5aeffbb06d
fs: split off setxattr_copy and do_setxattr function from setxattr

[ Upstream commit 1a91794ce8481a293c5ef432feb440aee1455619 ]

This splits of the setup part of the function setxattr in its own
dedicated function called setxattr_copy. In addition it also exposes a new
function called do_setxattr for making the setxattr call.

This makes it possible to call these two functions from io_uring in the
processing of an xattr request.

Signed-off-by: Stefan Roesch <shr@fb.com>
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
Link: https://lore.kernel.org/r/20220323154420.3301504-2-shr@fb.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Stable-dep-of: 06bbaa6dc53c ("[coredump] don't use __kernel_write() on kmap_local_page()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/internal.h
fs/xattr.c