[PATCH] splice: redo page lookup if add_to_page_cache() returns -EEXIST
authorJens Axboe <axboe@suse.de>
Wed, 3 May 2006 08:58:22 +0000 (10:58 +0200)
committerJens Axboe <axboe@nelson.home.kernel.dk>
Thu, 4 May 2006 04:55:12 +0000 (06:55 +0200)
commita0548871ed267ae12eb1c860c5aaebd9e466b34e
tree457aff209cd9a2a1c3c2678b639268dfa482f3d1
parent76ad4d11105ccd40a536db1057083f28326019fd
[PATCH] splice: redo page lookup if add_to_page_cache() returns -EEXIST

This can happen quite easily, if several processes are trying to splice
the same file at the same time. It's not a failure, it just means someone
raced with us in allocating this file page. So just dump the allocated
page and relookup the original.

Signed-off-by: Jens Axboe <axboe@suse.de>
fs/splice.c