diff options
-rw-r--r-- | fs/xfs/xfs_inode.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c index cfbafc937ee5..8da67d5717c8 100644 --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c | |||
@@ -3707,7 +3707,7 @@ xfs_iext_add_indirect_multi( | |||
3707 | * (all extents past */ | 3707 | * (all extents past */ |
3708 | if (nex2) { | 3708 | if (nex2) { |
3709 | byte_diff = nex2 * sizeof(xfs_bmbt_rec_t); | 3709 | byte_diff = nex2 * sizeof(xfs_bmbt_rec_t); |
3710 | nex2_ep = (xfs_bmbt_rec_t *) kmem_alloc(byte_diff, KM_SLEEP); | 3710 | nex2_ep = (xfs_bmbt_rec_t *) kmem_alloc(byte_diff, KM_NOFS); |
3711 | memmove(nex2_ep, &erp->er_extbuf[idx], byte_diff); | 3711 | memmove(nex2_ep, &erp->er_extbuf[idx], byte_diff); |
3712 | erp->er_extcount -= nex2; | 3712 | erp->er_extcount -= nex2; |
3713 | xfs_iext_irec_update_extoffs(ifp, erp_idx + 1, -nex2); | 3713 | xfs_iext_irec_update_extoffs(ifp, erp_idx + 1, -nex2); |
@@ -4007,8 +4007,7 @@ xfs_iext_realloc_direct( | |||
4007 | ifp->if_u1.if_extents = | 4007 | ifp->if_u1.if_extents = |
4008 | kmem_realloc(ifp->if_u1.if_extents, | 4008 | kmem_realloc(ifp->if_u1.if_extents, |
4009 | rnew_size, | 4009 | rnew_size, |
4010 | ifp->if_real_bytes, | 4010 | ifp->if_real_bytes, KM_NOFS); |
4011 | KM_SLEEP); | ||
4012 | } | 4011 | } |
4013 | if (rnew_size > ifp->if_real_bytes) { | 4012 | if (rnew_size > ifp->if_real_bytes) { |
4014 | memset(&ifp->if_u1.if_extents[ifp->if_bytes / | 4013 | memset(&ifp->if_u1.if_extents[ifp->if_bytes / |
@@ -4067,7 +4066,7 @@ xfs_iext_inline_to_direct( | |||
4067 | xfs_ifork_t *ifp, /* inode fork pointer */ | 4066 | xfs_ifork_t *ifp, /* inode fork pointer */ |
4068 | int new_size) /* number of extents in file */ | 4067 | int new_size) /* number of extents in file */ |
4069 | { | 4068 | { |
4070 | ifp->if_u1.if_extents = kmem_alloc(new_size, KM_SLEEP); | 4069 | ifp->if_u1.if_extents = kmem_alloc(new_size, KM_NOFS); |
4071 | memset(ifp->if_u1.if_extents, 0, new_size); | 4070 | memset(ifp->if_u1.if_extents, 0, new_size); |
4072 | if (ifp->if_bytes) { | 4071 | if (ifp->if_bytes) { |
4073 | memcpy(ifp->if_u1.if_extents, ifp->if_u2.if_inline_ext, | 4072 | memcpy(ifp->if_u1.if_extents, ifp->if_u2.if_inline_ext, |
@@ -4099,7 +4098,7 @@ xfs_iext_realloc_indirect( | |||
4099 | } else { | 4098 | } else { |
4100 | ifp->if_u1.if_ext_irec = (xfs_ext_irec_t *) | 4099 | ifp->if_u1.if_ext_irec = (xfs_ext_irec_t *) |
4101 | kmem_realloc(ifp->if_u1.if_ext_irec, | 4100 | kmem_realloc(ifp->if_u1.if_ext_irec, |
4102 | new_size, size, KM_SLEEP); | 4101 | new_size, size, KM_NOFS); |
4103 | } | 4102 | } |
4104 | } | 4103 | } |
4105 | 4104 | ||
@@ -4341,11 +4340,10 @@ xfs_iext_irec_init( | |||
4341 | nextents = ifp->if_bytes / (uint)sizeof(xfs_bmbt_rec_t); | 4340 | nextents = ifp->if_bytes / (uint)sizeof(xfs_bmbt_rec_t); |
4342 | ASSERT(nextents <= XFS_LINEAR_EXTS); | 4341 | ASSERT(nextents <= XFS_LINEAR_EXTS); |
4343 | 4342 | ||
4344 | erp = (xfs_ext_irec_t *) | 4343 | erp = kmem_alloc(sizeof(xfs_ext_irec_t), KM_NOFS); |
4345 | kmem_alloc(sizeof(xfs_ext_irec_t), KM_SLEEP); | ||
4346 | 4344 | ||
4347 | if (nextents == 0) { | 4345 | if (nextents == 0) { |
4348 | ifp->if_u1.if_extents = kmem_alloc(XFS_IEXT_BUFSZ, KM_SLEEP); | 4346 | ifp->if_u1.if_extents = kmem_alloc(XFS_IEXT_BUFSZ, KM_NOFS); |
4349 | } else if (!ifp->if_real_bytes) { | 4347 | } else if (!ifp->if_real_bytes) { |
4350 | xfs_iext_inline_to_direct(ifp, XFS_IEXT_BUFSZ); | 4348 | xfs_iext_inline_to_direct(ifp, XFS_IEXT_BUFSZ); |
4351 | } else if (ifp->if_real_bytes < XFS_IEXT_BUFSZ) { | 4349 | } else if (ifp->if_real_bytes < XFS_IEXT_BUFSZ) { |
@@ -4393,7 +4391,7 @@ xfs_iext_irec_new( | |||
4393 | 4391 | ||
4394 | /* Initialize new extent record */ | 4392 | /* Initialize new extent record */ |
4395 | erp = ifp->if_u1.if_ext_irec; | 4393 | erp = ifp->if_u1.if_ext_irec; |
4396 | erp[erp_idx].er_extbuf = kmem_alloc(XFS_IEXT_BUFSZ, KM_SLEEP); | 4394 | erp[erp_idx].er_extbuf = kmem_alloc(XFS_IEXT_BUFSZ, KM_NOFS); |
4397 | ifp->if_real_bytes = nlists * XFS_IEXT_BUFSZ; | 4395 | ifp->if_real_bytes = nlists * XFS_IEXT_BUFSZ; |
4398 | memset(erp[erp_idx].er_extbuf, 0, XFS_IEXT_BUFSZ); | 4396 | memset(erp[erp_idx].er_extbuf, 0, XFS_IEXT_BUFSZ); |
4399 | erp[erp_idx].er_extcount = 0; | 4397 | erp[erp_idx].er_extcount = 0; |