]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: trylock underlying buffer on dquot flush
authorBrian Foster <bfoster@redhat.com>
Wed, 26 Oct 2022 06:28:39 +0000 (11:58 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 29 Oct 2022 08:20:34 +0000 (10:20 +0200)
commite210de842a342d92196d05612581e86d9ff685e6
tree4d6e274b993f5571dbc9c1f8d4655286d1a22d54
parent2f955aaf658172dae22ff36aacb897c8c9d3b59b
xfs: trylock underlying buffer on dquot flush

commit 60c63658a4e9c08b52ab41ec8a3d8cd47bc52ca8 upstream.

A dquot flush currently blocks on the buffer lock for the underlying
dquot buffer. In turn, this causes xfsaild to block rather than
continue processing other items in the meantime. Update
xfs_qm_dqflush() to trylock the buffer, similar to how inode buffers
are handled, and return -EAGAIN if the lock fails. Fix up any
callers that don't currently handle the error properly.

Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Acked-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Chandan Babu R <chandan.babu@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/xfs/xfs_dquot.c
fs/xfs/xfs_dquot_item.c
fs/xfs/xfs_qm.c