]> git.baikalelectronics.ru Git - kernel.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>
Wed, 5 Apr 2023 09:16:42 +0000 (11:16 +0200)
commitd5d6304431f2eb7c3860273d7e4bff12bc9df47b
tree23b823eaced9defc464ab25ebb10fb1c4b17d0b6
parente3deee4a41a6d4250d491994b5a1d6e3859c352b
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: 6e540023c145 ("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