summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2012-04-23 07:58:48 +0200
committerBen Myers <bpm@sgi.com>2012-05-14 23:20:44 +0200
commitbf813cdddfb3a5bc88e1612e8f62a12367871213 (patch)
tree29480a169d165ff695bebb65d5a63b74eb6f9c96 /fs
parentxfs: fix incorrect b_offset initialisation (diff)
downloadlinux-bf813cdddfb3a5bc88e1612e8f62a12367871213.tar.xz
linux-bf813cdddfb3a5bc88e1612e8f62a12367871213.zip
xfs: use kmem_zone_zalloc for buffers
To replace the alloc/memset pair. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Mark Tinguely <tinguely@sgi.com> Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/xfs/xfs_buf.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
index ddfc58f40506..f463dce42515 100644
--- a/fs/xfs/xfs_buf.c
+++ b/fs/xfs/xfs_buf.c
@@ -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);