lkml.org 
[lkml]   [2022]   [Sep]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.4 106/120] xfs: add missing assert in xfs_fsmap_owner_from_rmap
    Date
    From: "Darrick J. Wong" <darrick.wong@oracle.com>

    commit 110f09cb705af8c53f2a457baf771d2935ed62d4 upstream.

    The fsmap handler shouldn't fail silently if the rmap code ever feeds it
    a special owner number that isn't known to the fsmap handler.

    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
    Reviewed-by: Christoph Hellwig <hch@lst.de>
    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_fsmap.c | 1 +
    1 file changed, 1 insertion(+)

    --- a/fs/xfs/xfs_fsmap.c
    +++ b/fs/xfs/xfs_fsmap.c
    @@ -146,6 +146,7 @@ xfs_fsmap_owner_from_rmap(
    dest->fmr_owner = XFS_FMR_OWN_FREE;
    break;
    default:
    + ASSERT(0);
    return -EFSCORRUPTED;
    }
    return 0;

    \
     
     \ /
      Last update: 2022-09-26 12:56    [W:4.121 / U:0.056 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site