From e0cb8521cb697dea77af6a6daab37c1a767f11fc Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Thu, 14 Jul 2022 11:15:50 -0700 Subject: xfs: apply noalloc mode to inode allocations too Don't allow inode allocations from this group if it's marked noalloc. Signed-off-by: Darrick J. Wong --- fs/xfs/libxfs/xfs_ialloc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'fs') diff --git a/fs/xfs/libxfs/xfs_ialloc.c b/fs/xfs/libxfs/xfs_ialloc.c index b8b21c63ad7d..c9bab87ae926 100644 --- a/fs/xfs/libxfs/xfs_ialloc.c +++ b/fs/xfs/libxfs/xfs_ialloc.c @@ -1019,6 +1019,7 @@ xfs_dialloc_ag_inobt( ASSERT(pag->pagi_init); ASSERT(pag->pagi_inodeok); + ASSERT(!pag->pagf_noalloc); ASSERT(pag->pagi_freecount > 0); restart_pagno: @@ -1645,7 +1646,7 @@ xfs_dialloc_good_ag( int needspace; int error; - if (!pag->pagi_inodeok) + if (!pag->pagi_inodeok || pag->pagf_noalloc) return false; if (!pag->pagi_init) { -- cgit v1.2.3