Skip to content

Commit c2988eb

Browse files
author
Darrick J. Wong
committed
xfs: rt stubs should return negative errnos when rt disabled
When realtime support is not compiled into the kernel, these functions should return negative errnos, not positive errnos. While we're at it, fix a broken macro declaration. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
1 parent b73494f commit c2988eb

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

fs/xfs/xfs_rtalloc.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -141,17 +141,17 @@ int xfs_rtalloc_extent_is_free(struct xfs_mount *mp, struct xfs_trans *tp,
141141
bool *is_free);
142142
int xfs_rtalloc_reinit_frextents(struct xfs_mount *mp);
143143
#else
144-
# define xfs_rtallocate_extent(t,b,min,max,l,f,p,rb) (ENOSYS)
145-
# define xfs_rtfree_extent(t,b,l) (ENOSYS)
146-
# define xfs_rtfree_blocks(t,rb,rl) (ENOSYS)
147-
# define xfs_rtpick_extent(m,t,l,rb) (ENOSYS)
148-
# define xfs_growfs_rt(mp,in) (ENOSYS)
149-
# define xfs_rtalloc_query_range(t,l,h,f,p) (ENOSYS)
150-
# define xfs_rtalloc_query_all(m,t,f,p) (ENOSYS)
151-
# define xfs_rtbuf_get(m,t,b,i,p) (ENOSYS)
152-
# define xfs_verify_rtbno(m, r) (false)
153-
# define xfs_rtalloc_extent_is_free(m,t,s,l,i) (ENOSYS)
154-
# define xfs_rtalloc_reinit_frextents(m) (0)
144+
# define xfs_rtallocate_extent(t,b,min,max,l,f,p,rb) (-ENOSYS)
145+
# define xfs_rtfree_extent(t,b,l) (-ENOSYS)
146+
# define xfs_rtfree_blocks(t,rb,rl) (-ENOSYS)
147+
# define xfs_rtpick_extent(m,t,l,rb) (-ENOSYS)
148+
# define xfs_growfs_rt(mp,in) (-ENOSYS)
149+
# define xfs_rtalloc_query_range(m,t,l,h,f,p) (-ENOSYS)
150+
# define xfs_rtalloc_query_all(m,t,f,p) (-ENOSYS)
151+
# define xfs_rtbuf_get(m,t,b,i,p) (-ENOSYS)
152+
# define xfs_verify_rtbno(m, r) (false)
153+
# define xfs_rtalloc_extent_is_free(m,t,s,l,i) (-ENOSYS)
154+
# define xfs_rtalloc_reinit_frextents(m) (0)
155155
static inline int /* error */
156156
xfs_rtmount_init(
157157
xfs_mount_t *mp) /* file system mount structure */
@@ -162,7 +162,7 @@ xfs_rtmount_init(
162162
xfs_warn(mp, "Not built with CONFIG_XFS_RT");
163163
return -ENOSYS;
164164
}
165-
# define xfs_rtmount_inodes(m) (((mp)->m_sb.sb_rblocks == 0)? 0 : (ENOSYS))
165+
# define xfs_rtmount_inodes(m) (((mp)->m_sb.sb_rblocks == 0)? 0 : (-ENOSYS))
166166
# define xfs_rtunmount_inodes(m)
167167
#endif /* CONFIG_XFS_RT */
168168

0 commit comments

Comments
 (0)