]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
fuse: truncate pending writes on O_TRUNC
authorMiklos Szeredi <mszeredi@redhat.com>
Wed, 23 Oct 2019 12:26:37 +0000 (14:26 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 Nov 2019 11:18:15 +0000 (12:18 +0100)
commit709c37e26c49faee2b3b45fe4eff459b99b9128e
treef17a4ead0c05c370c3460ee8ac37d89a1eea9a88
parentc829f32c09dd396f5ed0be8aa33470c314c677d6
fuse: truncate pending writes on O_TRUNC

commit e4648309b85a78f8c787457832269a8712a8673e upstream.

Make sure cached writes are not reordered around open(..., O_TRUNC), with
the obvious wrong results.

Fixes: 4d99ff8f12eb ("fuse: Turn writeback cache on")
Cc: <stable@vger.kernel.org> # v3.15+
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/fuse/file.c