xfs: Specify lockmode when calling xfs_ilock_for_iomap()

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2068237

commit 9641506b2deed1bb6be7464a95d62c472eca0e8e
Author: Stefan Roesch <shr@fb.com>
Date:   Thu Jun 23 10:51:56 2022 -0700

    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>

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
This commit is contained in:
Jeff Moyer 2022-06-23 10:51:56 -07:00
parent 6e3a2231ea
commit 883b02462d
1 changed files with 3 additions and 3 deletions

View File

@ -696,7 +696,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);
/*
@ -774,7 +774,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;
u64 seq;
ASSERT(flags & (IOMAP_WRITE | IOMAP_ZERO));
@ -1194,7 +1194,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;
u64 seq;
ASSERT(!(flags & (IOMAP_WRITE | IOMAP_ZERO)));