diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2009-07-09 08:52:32 -0400 |
---|---|---|
committer | Jens Axboe <axboe@carl.(none)> | 2009-07-10 14:31:53 -0400 |
commit | 8aa7e847d834ed937a9ad37a0f2ad5b8584c1ab0 (patch) | |
tree | 76c8b4f1362a928d426f2201790ab5d128f57724 /fs/xfs | |
parent | c2cc49a2f8a479dde96a599646d30b6cc9dbed78 (diff) |
Fix congestion_wait() sync/async vs read/write confusion
Commit 1faa16d22877f4839bd433547d770c676d1d964c accidentally broke
the bdi congestion wait queue logic, causing us to wait on congestion
for WRITE (== 1) when we really wanted BLK_RW_ASYNC (== 0) instead.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/linux-2.6/kmem.c | 4 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_buf.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/fs/xfs/linux-2.6/kmem.c b/fs/xfs/linux-2.6/kmem.c index 1cd3b55ee3d2..2d3f90afe5f1 100644 --- a/fs/xfs/linux-2.6/kmem.c +++ b/fs/xfs/linux-2.6/kmem.c | |||
@@ -53,7 +53,7 @@ kmem_alloc(size_t size, unsigned int __nocast flags) | |||
53 | printk(KERN_ERR "XFS: possible memory allocation " | 53 | printk(KERN_ERR "XFS: possible memory allocation " |
54 | "deadlock in %s (mode:0x%x)\n", | 54 | "deadlock in %s (mode:0x%x)\n", |
55 | __func__, lflags); | 55 | __func__, lflags); |
56 | congestion_wait(WRITE, HZ/50); | 56 | congestion_wait(BLK_RW_ASYNC, HZ/50); |
57 | } while (1); | 57 | } while (1); |
58 | } | 58 | } |
59 | 59 | ||
@@ -130,7 +130,7 @@ kmem_zone_alloc(kmem_zone_t *zone, unsigned int __nocast flags) | |||
130 | printk(KERN_ERR "XFS: possible memory allocation " | 130 | printk(KERN_ERR "XFS: possible memory allocation " |
131 | "deadlock in %s (mode:0x%x)\n", | 131 | "deadlock in %s (mode:0x%x)\n", |
132 | __func__, lflags); | 132 | __func__, lflags); |
133 | congestion_wait(WRITE, HZ/50); | 133 | congestion_wait(BLK_RW_ASYNC, HZ/50); |
134 | } while (1); | 134 | } while (1); |
135 | } | 135 | } |
136 | 136 | ||
diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c index 1418b916fc27..0c93c7ef3d18 100644 --- a/fs/xfs/linux-2.6/xfs_buf.c +++ b/fs/xfs/linux-2.6/xfs_buf.c | |||
@@ -412,7 +412,7 @@ _xfs_buf_lookup_pages( | |||
412 | 412 | ||
413 | XFS_STATS_INC(xb_page_retries); | 413 | XFS_STATS_INC(xb_page_retries); |
414 | xfsbufd_wakeup(0, gfp_mask); | 414 | xfsbufd_wakeup(0, gfp_mask); |
415 | congestion_wait(WRITE, HZ/50); | 415 | congestion_wait(BLK_RW_ASYNC, HZ/50); |
416 | goto retry; | 416 | goto retry; |
417 | } | 417 | } |
418 | 418 | ||