]> www.infradead.org Git - users/jedix/linux-maple.git/commit
fsverity: don't drop pagecache at end of FS_IOC_ENABLE_VERITY
authorEric Biggers <ebiggers@google.com>
Tue, 14 Mar 2023 23:31:32 +0000 (16:31 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Apr 2023 10:10:34 +0000 (12:10 +0200)
commit0b0e1551ba9a8e523d9a5ef2f400cb621d997d79
treed7331c6c248e9f2f32e618d88bb7a5b8f355854d
parentfc426026c3a3bd939f1ebae31f880ecf2724cc74
fsverity: don't drop pagecache at end of FS_IOC_ENABLE_VERITY

[ Upstream commit a075bacde257f755bea0e53400c9f1cdd1b8e8e6 ]

The full pagecache drop at the end of FS_IOC_ENABLE_VERITY is causing
performance problems and is hindering adoption of fsverity.  It was
intended to solve a race condition where unverified pages might be left
in the pagecache.  But actually it doesn't solve it fully.

Since the incomplete solution for this race condition has too much
performance impact for it to be worth it, let's remove it for now.

Fixes: 3fda4c617e84 ("fs-verity: implement FS_IOC_ENABLE_VERITY ioctl")
Cc: stable@vger.kernel.org
Reviewed-by: Victor Hsieh <victorhsieh@google.com>
Link: https://lore.kernel.org/r/20230314235332.50270-1-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/verity/enable.c