Merge tag 'vfio-v5.12-rc4' of git://github.com/awilliam/linux-vfio
[linux-2.6-microblaze.git] / fs / xfs / xfs_rtalloc.c
index b4999fb..161b0e8 100644 (file)
@@ -804,6 +804,11 @@ xfs_growfs_rt_alloc(
                xfs_ilock(ip, XFS_ILOCK_EXCL);
                xfs_trans_ijoin(tp, ip, XFS_ILOCK_EXCL);
 
+               error = xfs_iext_count_may_overflow(ip, XFS_DATA_FORK,
+                               XFS_IEXT_ADD_NOSPLIT_CNT);
+               if (error)
+                       goto out_trans_cancel;
+
                /*
                 * Allocate blocks to the bitmap file.
                 */