Re: linux-kernel@vger.kernel.org
Andrew Morton (akpm@zip.com.au)
Wed, 30 Jan 2002 17:11:01 -0800
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/