]> www.infradead.org Git - users/hch/xfs.git/commitdiff
xfs: don't return an error from xfs_update_last_rtgroup_size for !XFS_RT
authorChristoph Hellwig <hch@lst.de>
Tue, 17 Dec 2024 04:27:35 +0000 (05:27 +0100)
committerCarlos Maiolino <cem@kernel.org>
Wed, 8 Jan 2025 13:55:29 +0000 (14:55 +0100)
Non-rtg file systems have a fake RT group even if they do not have a RT
device, and thus an rgcount of 1.  Ensure xfs_update_last_rtgroup_size
doesn't fail when called for !XFS_RT to handle this case.

Fixes: 87fe4c34a383 ("xfs: create incore realtime group structures")
Reported-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
fs/xfs/libxfs/xfs_rtgroup.h

index de4eeb381fc9fcc4eaec6000fc91ee6d2836a8fd..03f39d4e43fc7f3a9583730e5634a46520ceed21 100644 (file)
@@ -328,7 +328,7 @@ static inline int xfs_initialize_rtgroups(struct xfs_mount *mp,
 }
 
 # define xfs_rtgroup_extents(mp, rgno)         (0)
-# define xfs_update_last_rtgroup_size(mp, rgno)        (-EOPNOTSUPP)
+# define xfs_update_last_rtgroup_size(mp, rgno)        (0)
 # define xfs_rtgroup_lock(rtg, gf)             ((void)0)
 # define xfs_rtgroup_unlock(rtg, gf)           ((void)0)
 # define xfs_rtgroup_trans_join(tp, rtg, gf)   ((void)0)