Re: [PATCH] mm: add replace_page_cache_page() function

From: Rik van Riel
Date: Wed Dec 15 2010 - 11:50:41 EST


On 12/15/2010 10:49 AM, Miklos Szeredi wrote:
From: Miklos Szeredi<mszeredi@xxxxxxx>

This function basically does:

remove_from_page_cache(old);
page_cache_release(old);
add_to_page_cache_locked(new);

Except it does this atomically, so there's no possibility for the
"add" to fail because of a race.

This is used by fuse to move pages into the page cache.

Signed-off-by: Miklos Szeredi<mszeredi@xxxxxxx>

Acked-by: Rik van Riel <riel@xxxxxxxxxx>

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