]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: reduce ilock acquisitions in xfs_file_fsync
authorChristoph Hellwig <hch@lst.de>
Sat, 23 Jan 2021 00:48:25 +0000 (16:48 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Sat, 23 Jan 2021 00:54:52 +0000 (16:54 -0800)
commitad0014c0c908d292f99a2b584a6c96cd79ea7e17
tree188a3f6a0936b2377baf3ebe757296a08d103945
parent196f8bf87a060bcb2f6e0f465c118fcedf04d980
xfs: reduce ilock acquisitions in xfs_file_fsync

If the inode is not pinned by the time fsync is called we don't need the
ilock to protect against concurrent clearing of ili_fsync_fields as the
inode won't need a log flush or clearing of these fields.  Not taking
the iolock allows for full concurrency of fsync and thus O_DSYNC
completions with io_uring/aio write submissions.

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