xfs: I/O completion handlers must use NOFS allocations
[safe/jmp/linux-2.6] / fs / xfs / xfs_trans.c
index 66b8493..237badc 100644 (file)
@@ -236,19 +236,20 @@ xfs_trans_alloc(
        uint            type)
 {
        xfs_wait_for_freeze(mp, SB_FREEZE_TRANS);
-       return _xfs_trans_alloc(mp, type);
+       return _xfs_trans_alloc(mp, type, KM_SLEEP);
 }
 
 xfs_trans_t *
 _xfs_trans_alloc(
        xfs_mount_t     *mp,
-       uint            type)
+       uint            type,
+       uint            memflags)
 {
        xfs_trans_t     *tp;
 
        atomic_inc(&mp->m_active_trans);
 
-       tp = kmem_zone_zalloc(xfs_trans_zone, KM_SLEEP);
+       tp = kmem_zone_zalloc(xfs_trans_zone, memflags);
        tp->t_magic = XFS_TRANS_MAGIC;
        tp->t_type = type;
        tp->t_mountp = mp;