xfs: move more RT specific code under CONFIG_XFS_RT
[sfrench/cifs-2.6.git] / fs / xfs / xfs_bmap_util.h
index 0eaa81dc49be674137cda51a3364b54721c10d58..7d330b3c77c3576fb6d58974e7af97c4b0ecc8e1 100644 (file)
@@ -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,