xfs: Specify lockmode when calling xfs_ilock_for_iomap()
This patch changes the helper function xfs_ilock_for_iomap such that the lock mode must be passed in. Signed-off-by: Stefan Roesch <shr@fb.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Link: https://lore.kernel.org/r/20220623175157.1715274-14-shr@fb.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
1c849b481b
commit
9641506b2d
|
@ -664,7 +664,7 @@ xfs_ilock_for_iomap(
|
|||
unsigned flags,
|
||||
unsigned *lockmode)
|
||||
{
|
||||
unsigned mode = XFS_ILOCK_SHARED;
|
||||
unsigned int mode = *lockmode;
|
||||
bool is_write = flags & (IOMAP_WRITE | IOMAP_ZERO);
|
||||
|
||||
/*
|
||||
|
@ -742,7 +742,7 @@ xfs_direct_write_iomap_begin(
|
|||
int nimaps = 1, error = 0;
|
||||
bool shared = false;
|
||||
u16 iomap_flags = 0;
|
||||
unsigned lockmode;
|
||||
unsigned int lockmode = XFS_ILOCK_SHARED;
|
||||
|
||||
ASSERT(flags & (IOMAP_WRITE | IOMAP_ZERO));
|
||||
|
||||
|
@ -1172,7 +1172,7 @@ xfs_read_iomap_begin(
|
|||
xfs_fileoff_t end_fsb = xfs_iomap_end_fsb(mp, offset, length);
|
||||
int nimaps = 1, error = 0;
|
||||
bool shared = false;
|
||||
unsigned lockmode;
|
||||
unsigned int lockmode = XFS_ILOCK_SHARED;
|
||||
|
||||
ASSERT(!(flags & (IOMAP_WRITE | IOMAP_ZERO)));
|
||||
|
||||
|
|
Loading…
Reference in New Issue