Re: [PATCH] xfs: use alloc_pages_bulk_array() for buffers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 20, 2021 at 04:42:37PM -0700, Darrick J. Wong wrote:
> > @@ -292,8 +292,8 @@ _xfs_buf_get_pages(
> >  			if (bp->b_pages == NULL)
> >  				return -ENOMEM;
> >  		}
> > -		memset(bp->b_pages, 0, sizeof(struct page *) * page_count);
> >  	}
> > +	memset(bp->b_pages, 0, sizeof(struct page *) * bp->b_page_count);
> 
> Could this kmem_alloc be converted to kmem_zalloc?

Yes.

> And isn't the xfs_buf allocated with zalloc, which means we don't need
> to zero b_page_array itself?

Yes.

> Confused about why this is needed.

My series cleans up all this mess and the rebases the allocation change
from Dave on top.  Maybe that is a better start :)





[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux