Re: linux-kernel@vger.kernel.org

From: Andrew Morton (akpm@zip.com.au)
Date: Wed Jan 30 2002 - 20:11:01 EST


Ulrich Weigand wrote:
>
> Momchil Velikov wrote:
>
> +int move_from_swap_cache(struct page *page, unsigned long index,
> + struct address_space *mapping)
> +{
> + void **pslot;
> + int err;
> +
> + if (!PageLocked(page))
> + BUG();
> +
> + spin_lock(&swapper_space.i_shared_lock);
> + spin_lock(&mapping->i_shared_lock);
> +
> + err = radix_tree_reserve(&mapping->page_tree, index, &pslot);
> + if (!err) {
> + swp_entry_t entry;
> +
> + block_flushpage(page, 0);

block_flushpage inside spinlock is a no-no. It does I/O,
and sleeps.

-
-
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/



This archive was generated by hypermail 2b29 : Thu Jan 31 2002 - 21:01:29 EST