xfs: move more RT specific code under CONFIG_XFS_RT
commit bb9c2e5433250f5b477035dc478314f8e6dd5e36 upstream. Various utility functions and interfaces that iterate internal devices try to reference the realtime device even when RT support is not compiled into the kernel. Make sure this code is excluded from the CONFIG_XFS_RT=n build, and where appropriate stub functions to return fatal errors if they ever get called when RT support is not present. Signed-Off-By: Dave Chinner <dchinner@redhat.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
3042b3a5a4
commit
3a5a338aec
@ -84,6 +84,7 @@ xfs_zero_extent(
|
||||
GFP_NOFS, true);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_XFS_RT
|
||||
int
|
||||
xfs_bmap_rtalloc(
|
||||
struct xfs_bmalloca *ap) /* bmap alloc argument struct */
|
||||
@ -195,6 +196,7 @@ xfs_bmap_rtalloc(
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_XFS_RT */
|
||||
|
||||
/*
|
||||
* Check if the endoff is outside the last extent. If so the caller will grow
|
||||
|
@ -28,7 +28,20 @@ struct xfs_mount;
|
||||
struct xfs_trans;
|
||||
struct xfs_bmalloca;
|
||||
|
||||
#ifdef CONFIG_XFS_RT
|
||||
int xfs_bmap_rtalloc(struct xfs_bmalloca *ap);
|
||||
#else /* !CONFIG_XFS_RT */
|
||||
/*
|
||||
* Attempts to allocate RT extents when RT is disable indicates corruption and
|
||||
* should trigger a shutdown.
|
||||
*/
|
||||
static inline int
|
||||
xfs_bmap_rtalloc(struct xfs_bmalloca *ap)
|
||||
{
|
||||
return -EFSCORRUPTED;
|
||||
}
|
||||
#endif /* CONFIG_XFS_RT */
|
||||
|
||||
int xfs_bmap_eof(struct xfs_inode *ip, xfs_fileoff_t endoff,
|
||||
int whichfork, int *eof);
|
||||
int xfs_bmap_punch_delalloc_range(struct xfs_inode *ip,
|
||||
|
Loading…
x
Reference in New Issue
Block a user