Commit bf813cdd authored by Dave Chinner's avatar Dave Chinner Committed by Ben Myers

xfs: use kmem_zone_zalloc for buffers

To replace the alloc/memset pair.
Signed-off-by: default avatarDave Chinner <dchinner@redhat.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarMark Tinguely <tinguely@sgi.com>
Signed-off-by: default avatarBen Myers <bpm@sgi.com>
parent ead360c5
......@@ -178,7 +178,7 @@ xfs_buf_alloc(
{
struct xfs_buf *bp;
bp = kmem_zone_alloc(xfs_buf_zone, xb_to_km(flags));
bp = kmem_zone_zalloc(xfs_buf_zone, xb_to_km(flags));
if (unlikely(!bp))
return NULL;
......@@ -187,7 +187,6 @@ xfs_buf_alloc(
*/
flags &= ~(XBF_LOCK|XBF_MAPPED|XBF_DONT_BLOCK|XBF_READ_AHEAD);
memset(bp, 0, sizeof(xfs_buf_t));
atomic_set(&bp->b_hold, 1);
atomic_set(&bp->b_lru_ref, 1);
init_completion(&bp->b_iowait);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment