summaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_bitmap.c
diff options
context:
space:
mode:
authorArne Redlich <arne.redlich@googlemail.com>2012-03-16 08:19:33 +0100
committerPhilipp Reisner <philipp.reisner@linbit.com>2012-05-09 15:17:04 +0200
commit0c7db27920a87a8db73ca521b527617eceec3bca (patch)
tree7a2f223427d43b25550df23fbf2049629237b4cc /drivers/block/drbd/drbd_bitmap.c
parent4d95a10f97337415c1f74b4901d80e047f8dc128 (diff)
downloadlinux-stable-0c7db27920a87a8db73ca521b527617eceec3bca.tar.gz
linux-stable-0c7db27920a87a8db73ca521b527617eceec3bca.tar.bz2
linux-stable-0c7db27920a87a8db73ca521b527617eceec3bca.zip
drbd: bm_page_async_io: properly initialize page->private
If bm_page_async_io is advised to use a new page for I/O (BM_AIO_COPY_PAGES is set), it will get it from a mempool. Once the mempool has to dip into its reserves the page is not reinitialized, i.e. page->private contains garbage, which will lead to various problems once the I/O completes (dereferences of NULL pointers, the submitting thread getting stuck in D-state, ...). Signed-off-by: Arne Redlich <arne.redlich@googlemail.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com> Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Diffstat (limited to 'drivers/block/drbd/drbd_bitmap.c')
-rw-r--r--drivers/block/drbd/drbd_bitmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/drbd/drbd_bitmap.c b/drivers/block/drbd/drbd_bitmap.c
index 39a1b0dafff4..a24eb787a7a1 100644
--- a/drivers/block/drbd/drbd_bitmap.c
+++ b/drivers/block/drbd/drbd_bitmap.c
@@ -205,7 +205,7 @@ void drbd_bm_unlock(struct drbd_conf *mdev)
static void bm_store_page_idx(struct page *page, unsigned long idx)
{
BUG_ON(0 != (idx & ~BM_PAGE_IDX_MASK));
- page_private(page) |= idx;
+ set_page_private(page, idx);
}
static unsigned long bm_page_to_idx(struct page *page)