Skip to content

Commit

Permalink
xfs: add missing assert in xfs_fsmap_owner_from_rmap
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Darrick J. Wong committed Nov 5, 2019
1 parent ee4fb16 commit 110f09c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/xfs/xfs_fsmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ xfs_fsmap_owner_from_rmap(
dest->fmr_owner = XFS_FMR_OWN_FREE;
break;
default:
ASSERT(0);
return -EFSCORRUPTED;
}
return 0;
Expand Down

0 comments on commit 110f09c

Please sign in to comment.