]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: ensure log flush at the end of a synchronous fallocate call
authorDave Chinner <dchinner@redhat.com>
Mon, 31 Jan 2022 21:20:10 +0000 (13:20 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 1 Feb 2022 22:14:48 +0000 (14:14 -0800)
commit42ec8f292d80181e82f6da18f2ae37c0513edfd8
tree56b0df7dc5a9fff9cbb5b476fab4121358ce80f9
parent52562a32a840a604c7376d4b105ea50e835c1584
xfs: ensure log flush at the end of a synchronous fallocate call

Since we've started treating fallocate more like a file write, we
should flush the log to disk if the user has asked for synchronous
writes either by setting it via fcntl flags, or inode flags, or with
the sync mount option.  We've already got a helper for this, so use
it.

[The original patch by Darrick was massaged by Dave to fit this patchset]

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
fs/xfs/xfs_file.c