23 Apr 2012 07:58
[PATCH 18/37] xfs: use kmem_zone_zalloc for buffers
Dave Chinner <david <at> fromorbit.com>
2012-04-23 05:58:48 GMT
2012-04-23 05:58:48 GMT
From: Dave Chinner <dchinner <at> redhat.com>
To replace the alloc/memset pair.
Signed-off-by: Dave Chinner <dchinner <at> redhat.com>
Reviewed-by: Christoph Hellwig <hch <at> lst.de>
Reviewed-by: Mark Tinguely <tinguely <at> sgi.com>
---
fs/xfs/xfs_buf.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
index ddfc58f..f463dce 100644
--- a/fs/xfs/xfs_buf.c
+++ b/fs/xfs/xfs_buf.c
<at> <at> -178,7 +178,7 <at> <at> 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;
<at> <at> -187,7 +187,6 <at> <at> 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);
--
--
1.7.9.5
_______________________________________________
xfs mailing list
xfs <at> oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
RSS Feed