]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: remove XFS_TRANS_NOFS
authorChristoph Hellwig <hch@lst.de>
Wed, 28 Aug 2019 16:08:09 +0000 (12:08 -0400)
committerEric Sandeen <sandeen@redhat.com>
Wed, 28 Aug 2019 16:08:09 +0000 (12:08 -0400)
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 <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/trans.c
libxfs/xfs_shared.h

index 713641a8f8646a444a40d861a7b5099bfb91b908..cda2450fc3bb76b796d8fda37a9745c8f9387877 100644 (file)
@@ -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);
index b9094709bc799bbb4f32bf403559099972893d29..c45acbd3add94d17ea83b5863cb1312cdb0c9f9b 100644 (file)
@@ -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