[PATCH] loop 9/9 don't lose PF_MEMDIE

Hugh Dickins (hugh@veritas.com)
Tue, 10 Jun 2003 16:38:03 +0100 (BST)


loop_get_buffer loses PF_MEMDIE if it's added while in loop_copy_bio:
not a high probability since it's not waiting there, but could happen,
and sets a bad example (compare with add_to_swap fixed a while back).

--- loop8/drivers/block/loop.c Tue Jun 10 11:55:11 2003
+++ loop9/drivers/block/loop.c Tue Jun 10 12:05:17 2003
@@ -484,7 +484,9 @@

current->flags &= ~PF_MEMALLOC;
bio = loop_copy_bio(rbh);
- current->flags = flags;
+ if (flags & PF_MEMALLOC)
+ current->flags |= PF_MEMALLOC;
+
if (bio == NULL)
blk_congestion_wait(WRITE, HZ/10);
} while (bio == NULL);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/