diff options
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_buf.c | 8 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_buf.h | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c index 4663f7dbff1c..660c24acb640 100644 --- a/fs/xfs/linux-2.6/xfs_buf.c +++ b/fs/xfs/linux-2.6/xfs_buf.c | |||
@@ -286,7 +286,7 @@ _pagebuf_initialize( | |||
286 | * most cases but may be reset (e.g. XFS recovery). | 286 | * most cases but may be reset (e.g. XFS recovery). |
287 | */ | 287 | */ |
288 | pb->pb_buffer_length = pb->pb_count_desired = range_length; | 288 | pb->pb_buffer_length = pb->pb_count_desired = range_length; |
289 | pb->pb_flags = flags | PBF_NONE; | 289 | pb->pb_flags = flags; |
290 | pb->pb_bn = XFS_BUF_DADDR_NULL; | 290 | pb->pb_bn = XFS_BUF_DADDR_NULL; |
291 | atomic_set(&pb->pb_pin_count, 0); | 291 | atomic_set(&pb->pb_pin_count, 0); |
292 | init_waitqueue_head(&pb->pb_waiters); | 292 | init_waitqueue_head(&pb->pb_waiters); |
@@ -458,8 +458,8 @@ _pagebuf_lookup_pages( | |||
458 | unlock_page(bp->pb_pages[i]); | 458 | unlock_page(bp->pb_pages[i]); |
459 | } | 459 | } |
460 | 460 | ||
461 | if (page_count) | 461 | if (page_count == bp->pb_page_count) |
462 | bp->pb_flags &= ~PBF_NONE; | 462 | bp->pb_flags |= PBF_DONE; |
463 | 463 | ||
464 | PB_TRACE(bp, "lookup_pages", (long)page_count); | 464 | PB_TRACE(bp, "lookup_pages", (long)page_count); |
465 | return error; | 465 | return error; |
@@ -1119,7 +1119,7 @@ pagebuf_iodone( | |||
1119 | { | 1119 | { |
1120 | pb->pb_flags &= ~(PBF_READ | PBF_WRITE); | 1120 | pb->pb_flags &= ~(PBF_READ | PBF_WRITE); |
1121 | if (pb->pb_error == 0) | 1121 | if (pb->pb_error == 0) |
1122 | pb->pb_flags &= ~PBF_NONE; | 1122 | pb->pb_flags |= PBF_DONE; |
1123 | 1123 | ||
1124 | PB_TRACE(pb, "iodone", pb->pb_iodone); | 1124 | PB_TRACE(pb, "iodone", pb->pb_iodone); |
1125 | 1125 | ||
diff --git a/fs/xfs/linux-2.6/xfs_buf.h b/fs/xfs/linux-2.6/xfs_buf.h index fa21d1f9cb0b..882901ca7eed 100644 --- a/fs/xfs/linux-2.6/xfs_buf.h +++ b/fs/xfs/linux-2.6/xfs_buf.h | |||
@@ -70,7 +70,7 @@ typedef enum page_buf_flags_e { /* pb_flags values */ | |||
70 | PBF_WRITE = (1 << 1), /* buffer intended for writing to device */ | 70 | PBF_WRITE = (1 << 1), /* buffer intended for writing to device */ |
71 | PBF_MAPPED = (1 << 2), /* buffer mapped (pb_addr valid) */ | 71 | PBF_MAPPED = (1 << 2), /* buffer mapped (pb_addr valid) */ |
72 | PBF_ASYNC = (1 << 4), /* initiator will not wait for completion */ | 72 | PBF_ASYNC = (1 << 4), /* initiator will not wait for completion */ |
73 | PBF_NONE = (1 << 5), /* buffer not read at all */ | 73 | PBF_DONE = (1 << 5), /* all pages in the buffer uptodate */ |
74 | PBF_DELWRI = (1 << 6), /* buffer has dirty pages */ | 74 | PBF_DELWRI = (1 << 6), /* buffer has dirty pages */ |
75 | PBF_STALE = (1 << 7), /* buffer has been staled, do not find it */ | 75 | PBF_STALE = (1 << 7), /* buffer has been staled, do not find it */ |
76 | PBF_FS_MANAGED = (1 << 8), /* filesystem controls freeing memory */ | 76 | PBF_FS_MANAGED = (1 << 8), /* filesystem controls freeing memory */ |
@@ -371,9 +371,9 @@ extern void pagebuf_trace( | |||
371 | #define XFS_BUF_GETERROR(x) pagebuf_geterror(x) | 371 | #define XFS_BUF_GETERROR(x) pagebuf_geterror(x) |
372 | #define XFS_BUF_ISERROR(x) (pagebuf_geterror(x)?1:0) | 372 | #define XFS_BUF_ISERROR(x) (pagebuf_geterror(x)?1:0) |
373 | 373 | ||
374 | #define XFS_BUF_DONE(x) ((x)->pb_flags &= ~PBF_NONE) | 374 | #define XFS_BUF_DONE(x) ((x)->pb_flags |= PBF_DONE) |
375 | #define XFS_BUF_UNDONE(x) ((x)->pb_flags |= PBF_NONE) | 375 | #define XFS_BUF_UNDONE(x) ((x)->pb_flags &= ~PBF_DONE) |
376 | #define XFS_BUF_ISDONE(x) (((x)->pb_flags & PBF_NONE) == 0) | 376 | #define XFS_BUF_ISDONE(x) ((x)->pb_flags & PBF_DONE) |
377 | 377 | ||
378 | #define XFS_BUF_BUSY(x) do { } while (0) | 378 | #define XFS_BUF_BUSY(x) do { } while (0) |
379 | #define XFS_BUF_UNBUSY(x) do { } while (0) | 379 | #define XFS_BUF_UNBUSY(x) do { } while (0) |