]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
cachefiles: Fix non-taking of sb_writers around set/removexattr
authorDavid Howells <dhowells@redhat.com>
Tue, 23 Jul 2024 14:35:29 +0000 (15:35 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Oct 2024 14:32:32 +0000 (16:32 +0200)
commitb54a3a8c04081c7aa3caa391f627c5abd13e219e
treeea205a971bed9aa69267a9543e62ef9b7bb9547a
parent13b3d0e8cb121f99b11918a0d4bcc1ce4647d352
cachefiles: Fix non-taking of sb_writers around set/removexattr

[ Upstream commit 80887f31672970abae3aaa9cf62ac72a124e7c89 ]

Unlike other vfs_xxxx() calls, vfs_setxattr() and vfs_removexattr() don't
take the sb_writers lock, so the caller should do it for them.

Fix cachefiles to do this.

Fixes: 9ae326a69004 ("CacheFiles: A cache that backs onto a mounted filesystem")
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Christian Brauner <brauner@kernel.org>
cc: Gao Xiang <xiang@kernel.org>
cc: netfs@lists.linux.dev
cc: linux-erofs@lists.ozlabs.org
cc: linux-fsdevel@vger.kernel.org
Link: https://lore.kernel.org/r/20240814203850.2240469-3-dhowells@redhat.com/
Signed-off-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/cachefiles/xattr.c