From: Darrick J. Wong <djwong@xxxxxxxxxx> Convert kmem_zalloc to kzalloc, and make it so that both memory allocation functions in this function use GFP_NOFS. Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx> --- fs/xfs/xfs_buf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c index dd16dfb669d8..19cefed4dca7 100644 --- a/fs/xfs/xfs_buf.c +++ b/fs/xfs/xfs_buf.c @@ -1978,7 +1978,7 @@ xfs_free_buftarg( invalidate_bdev(btp->bt_bdev); fs_put_dax(btp->bt_daxdev, btp->bt_mount); - kmem_free(btp); + kvfree(btp); } int @@ -2024,7 +2024,7 @@ xfs_alloc_buftarg_common( { struct xfs_buftarg *btp; - btp = kmem_zalloc(sizeof(*btp), KM_NOFS); + btp = kzalloc(sizeof(*btp), GFP_NOFS); if (!btp) return NULL; @@ -2040,7 +2040,7 @@ xfs_alloc_buftarg_common( if (list_lru_init(&btp->bt_lru)) goto error_free; - if (percpu_counter_init(&btp->bt_io_count, 0, GFP_KERNEL)) + if (percpu_counter_init(&btp->bt_io_count, 0, GFP_NOFS)) goto error_lru; btp->bt_shrinker.count_objects = xfs_buftarg_shrink_count; @@ -2058,7 +2058,7 @@ xfs_alloc_buftarg_common( error_lru: list_lru_destroy(&btp->bt_lru); error_free: - kmem_free(btp); + kvfree(btp); return NULL; }