OSDN Git Service

xfs: improve the xfs_dabuf_map calling conventions
authorChristoph Hellwig <hch@lst.de>
Wed, 20 Nov 2019 18:18:50 +0000 (10:18 -0800)
committerDarrick J. Wong <darrick.wong@oracle.com>
Fri, 22 Nov 2019 16:17:09 +0000 (08:17 -0800)
commit199e9ba4e4a9927f5addb644c1a1e1002e68cc30
treec9597500a8e4ffb1c621395a4d9deef6a9bfa4e1
parent45feef8f50b94d56d6a433ad5baf5cdf58e3db98
xfs: improve the xfs_dabuf_map calling conventions

Use a flags argument with the XFS_DABUF_MAP_HOLE_OK flag to signal that
a hole is okay and not corruption, and return 0 with *nmap set to 0 to
signal that case in the return value instead of a nameless -1 return
code.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/xfs/libxfs/xfs_da_btree.c
fs/xfs/libxfs/xfs_da_btree.h