From a36b220167051f144f831cb43d40f632b1858cef Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Wed, 28 Aug 2019 12:08:09 -0400 Subject: [PATCH] xfs: remove XFS_TRANS_NOFS Source kernel commit: 73d30d48749f883fbaaf68ef5d774e99ffafda5d Instead of a magic flag for xfs_trans_alloc, just ensure all callers that can't relclaim through the file system use memalloc_nofs_save to set the per-task nofs flag. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Signed-off-by: Eric Sandeen --- libxfs/trans.c | 3 +-- libxfs/xfs_shared.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/libxfs/trans.c b/libxfs/trans.c index 713641a8f..cda2450fc 100644 --- a/libxfs/trans.c +++ b/libxfs/trans.c @@ -258,8 +258,7 @@ libxfs_trans_alloc( struct xfs_trans *tp; int error; - tp = kmem_zone_zalloc(xfs_trans_zone, - (flags & XFS_TRANS_NOFS) ? KM_NOFS : KM_SLEEP); + tp = kmem_zone_zalloc(xfs_trans_zone, KM_SLEEP); tp->t_mountp = mp; INIT_LIST_HEAD(&tp->t_items); INIT_LIST_HEAD(&tp->t_dfops); diff --git a/libxfs/xfs_shared.h b/libxfs/xfs_shared.h index b9094709b..c45acbd3a 100644 --- a/libxfs/xfs_shared.h +++ b/libxfs/xfs_shared.h @@ -65,7 +65,6 @@ void xfs_log_get_max_trans_res(struct xfs_mount *mp, #define XFS_TRANS_DQ_DIRTY 0x10 /* at least one dquot in trx dirty */ #define XFS_TRANS_RESERVE 0x20 /* OK to use reserved data blocks */ #define XFS_TRANS_NO_WRITECOUNT 0x40 /* do not elevate SB writecount */ -#define XFS_TRANS_NOFS 0x80 /* pass KM_NOFS to kmem_alloc */ /* * LOWMODE is used by the allocator to activate the lowspace algorithm - when * free space is running low the extent allocator may choose to allocate an -- 2.47.2