lkml.org 
[lkml]   [2020]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.4 096/151] xfs: fix flags argument to rmap lookup when converting shared file rmaps
    Date
    From: Darrick J. Wong <darrick.wong@oracle.com>

    [ Upstream commit ea8439899c0b15a176664df62aff928010fad276 ]

    Pass the same oldext argument (which contains the existing rmapping's
    unwritten state) to xfs_rmap_lookup_le_range at the start of
    xfs_rmap_convert_shared. At this point in the code, flags is zero,
    which means that we perform lookups using the wrong key.

    Fixes: 3f165b334e51 ("xfs: convert unwritten status of reverse mappings for shared files")
    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
    Reviewed-by: Christoph Hellwig <hch@lst.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    fs/xfs/libxfs/xfs_rmap.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/fs/xfs/libxfs/xfs_rmap.c b/fs/xfs/libxfs/xfs_rmap.c
    index 38e9414878b3e..9d3c67b654ca7 100644
    --- a/fs/xfs/libxfs/xfs_rmap.c
    +++ b/fs/xfs/libxfs/xfs_rmap.c
    @@ -1379,7 +1379,7 @@ xfs_rmap_convert_shared(
    * record for our insertion point. This will also give us the record for
    * start block contiguity tests.
    */
    - error = xfs_rmap_lookup_le_range(cur, bno, owner, offset, flags,
    + error = xfs_rmap_lookup_le_range(cur, bno, owner, offset, oldext,
    &PREV, &i);
    if (error)
    goto done;
    --
    2.27.0


    \
     
     \ /
      Last update: 2020-11-17 14:29    [W:2.997 / U:0.020 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site