Re: [PATCH 2/2] xfs: stop using kmalloc in xfs_buf_get_noaddr

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Christoph Hellwig <hch@...>, <xfs@...>, <ecashin@...>, <akpm@...>
Cc: <linux-kernel@...>
Date: Monday, March 12, 2007 - 8:08 pm

Hi,

--On 9 March 2007 12:55:11 PM +0100 Christoph Hellwig <hch@lst.de> wrote:

....

It looks like you might need: for (i--; i >= 0; i--)
(or: for (j = 0; j < i; j++) etc.)

Because if the initial alloc_page loop goes to completion then:
  i == pagecount
and if alloc_page loop terminates early then
  bp->b_pages[i] == NULL
So we have gone 1 too far in both cases and need to
start free'ing back one.
Unless I missed something.

--Tim



-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 2/2] xfs: stop using kmalloc in xfs_buf_get_noaddr, Christoph Hellwig, (Wed Mar 7, 6:13 am)
Re: [PATCH 2/2] xfs: stop using kmalloc in xfs_buf_get_noaddr, Christoph Hellwig, (Fri Mar 9, 7:55 am)
Re: [PATCH 2/2] xfs: stop using kmalloc in xfs_buf_get_noaddr, Timothy Shimmin, (Mon Mar 12, 8:08 pm)
Re: [PATCH 2/2] xfs: stop using kmalloc in xfs_buf_get_noaddr, Christoph Hellwig, (Fri Mar 16, 8:36 pm)
Re: [PATCH 2/2] xfs: stop using kmalloc in xfs_buf_get_noaddr, Michael Nishimoto, (Wed Mar 7, 1:04 pm)
Re: [PATCH 2/2] xfs: stop using kmalloc in xfs_buf_get_noaddr, Christoph Hellwig, (Wed Mar 7, 1:15 pm)
Re: [PATCH 2/2] xfs: stop using kmalloc in xfs_buf_get_noaddr, Shailendra Tripathi, (Wed Mar 7, 8:14 am)
Re: [PATCH 2/2] xfs: stop using kmalloc in xfs_buf_get_noaddr, Christoph Hellwig, (Wed Mar 7, 8:38 am)