diff options
-rw-r--r-- | fs/xfs/linux-2.6/xfs_buf.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c index 58b6599de619..9bbadafdcb00 100644 --- a/fs/xfs/linux-2.6/xfs_buf.c +++ b/fs/xfs/linux-2.6/xfs_buf.c | |||
@@ -318,8 +318,12 @@ xfs_buf_free( | |||
318 | if ((bp->b_flags & XBF_MAPPED) && (bp->b_page_count > 1)) | 318 | if ((bp->b_flags & XBF_MAPPED) && (bp->b_page_count > 1)) |
319 | free_address(bp->b_addr - bp->b_offset); | 319 | free_address(bp->b_addr - bp->b_offset); |
320 | 320 | ||
321 | for (i = 0; i < bp->b_page_count; i++) | 321 | for (i = 0; i < bp->b_page_count; i++) { |
322 | page_cache_release(bp->b_pages[i]); | 322 | struct page *page = bp->b_pages[i]; |
323 | |||
324 | ASSERT(!PagePrivate(page)); | ||
325 | page_cache_release(page); | ||
326 | } | ||
323 | _xfs_buf_free_pages(bp); | 327 | _xfs_buf_free_pages(bp); |
324 | } else if (bp->b_flags & _XBF_KMEM_ALLOC) { | 328 | } else if (bp->b_flags & _XBF_KMEM_ALLOC) { |
325 | /* | 329 | /* |
@@ -400,6 +404,7 @@ _xfs_buf_lookup_pages( | |||
400 | nbytes = min_t(size_t, size, PAGE_CACHE_SIZE - offset); | 404 | nbytes = min_t(size_t, size, PAGE_CACHE_SIZE - offset); |
401 | size -= nbytes; | 405 | size -= nbytes; |
402 | 406 | ||
407 | ASSERT(!PagePrivate(page)); | ||
403 | if (!PageUptodate(page)) { | 408 | if (!PageUptodate(page)) { |
404 | page_count--; | 409 | page_count--; |
405 | if (blocksize >= PAGE_CACHE_SIZE) { | 410 | if (blocksize >= PAGE_CACHE_SIZE) { |
@@ -1117,10 +1122,10 @@ xfs_buf_bio_end_io( | |||
1117 | do { | 1122 | do { |
1118 | struct page *page = bvec->bv_page; | 1123 | struct page *page = bvec->bv_page; |
1119 | 1124 | ||
1125 | ASSERT(!PagePrivate(page)); | ||
1120 | if (unlikely(bp->b_error)) { | 1126 | if (unlikely(bp->b_error)) { |
1121 | if (bp->b_flags & XBF_READ) | 1127 | if (bp->b_flags & XBF_READ) |
1122 | ClearPageUptodate(page); | 1128 | ClearPageUptodate(page); |
1123 | SetPageError(page); | ||
1124 | } else if (blocksize >= PAGE_CACHE_SIZE) { | 1129 | } else if (blocksize >= PAGE_CACHE_SIZE) { |
1125 | SetPageUptodate(page); | 1130 | SetPageUptodate(page); |
1126 | } else if (!PagePrivate(page) && | 1131 | } else if (!PagePrivate(page) && |