]> git.karo-electronics.de Git - linux-beck.git/commitdiff
xfs: use GPF_NOFS when allocating btree cursors
authorDarrick J. Wong <darrick.wong@oracle.com>
Fri, 9 Dec 2016 05:49:54 +0000 (16:49 +1100)
committerDave Chinner <david@fromorbit.com>
Fri, 9 Dec 2016 05:49:54 +0000 (16:49 +1100)
Use NOFS for allocating btree cursors, since they can be called
under the ilock.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/libxfs/xfs_alloc_btree.c
fs/xfs/libxfs/xfs_bmap_btree.c
fs/xfs/libxfs/xfs_ialloc_btree.c

index 5ba2dac5e67c492a1a9fe5047995899290e25220..c06ec77a94182d346a7b96e3f1d47c3bcca0b5e0 100644 (file)
@@ -421,7 +421,7 @@ xfs_allocbt_init_cursor(
 
        ASSERT(btnum == XFS_BTNUM_BNO || btnum == XFS_BTNUM_CNT);
 
-       cur = kmem_zone_zalloc(xfs_btree_cur_zone, KM_SLEEP);
+       cur = kmem_zone_zalloc(xfs_btree_cur_zone, KM_NOFS);
 
        cur->bc_tp = tp;
        cur->bc_mp = mp;
index 8007d2ba9aef9c1c40e6f7159fc2a75a9d142213..049fa597ae91d0e1beaae18757b321290f56fc6b 100644 (file)
@@ -796,7 +796,7 @@ xfs_bmbt_init_cursor(
        struct xfs_btree_cur    *cur;
        ASSERT(whichfork != XFS_COW_FORK);
 
-       cur = kmem_zone_zalloc(xfs_btree_cur_zone, KM_SLEEP);
+       cur = kmem_zone_zalloc(xfs_btree_cur_zone, KM_NOFS);
 
        cur->bc_tp = tp;
        cur->bc_mp = mp;
index eab68ae2e01184c3441eda64f2deb86773645015..6c6b95947e716d9d56f6cccc8ba870bfe673297c 100644 (file)
@@ -357,7 +357,7 @@ xfs_inobt_init_cursor(
        struct xfs_agi          *agi = XFS_BUF_TO_AGI(agbp);
        struct xfs_btree_cur    *cur;
 
-       cur = kmem_zone_zalloc(xfs_btree_cur_zone, KM_SLEEP);
+       cur = kmem_zone_zalloc(xfs_btree_cur_zone, KM_NOFS);
 
        cur->bc_tp = tp;
        cur->bc_mp = mp;