xfs: factor out the common lock flags assert
authorKaixu Xia <kaixuxia@tencent.com>
Sun, 19 Jun 2022 21:53:42 +0000 (14:53 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Sun, 26 Jun 2022 21:43:28 +0000 (14:43 -0700)
commitca76a761ea2497a250988fd67f12fd93524e611e
tree144c983688248b41a6b6bfa10ca61e7f75e04e26
parent5e672cd69f0a534a445df4372141fd0d1d00901d
xfs: factor out the common lock flags assert

There are similar lock flags assert in xfs_ilock(), xfs_ilock_nowait(),
xfs_iunlock(), thus we can factor it out into a helper that is clear.

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