]> 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:29:00 +0000 (16:29 +0200)
commit81b048b9484bf8b3c0ad6e901a6b79fb941173b0
treebe0eef55eec4faecc8187d6dc86bfbcdad7b097c
parent19f3bec2ac4be329b9bd12b18a989b867618d2d8
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