projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
76ad4d1
)
[PATCH] splice: redo page lookup if add_to_page_cache() returns -EEXIST
author
Jens Axboe
<axboe@suse.de>
Wed, 3 May 2006 08:58:22 +0000
(10:58 +0200)
committer
Jens Axboe
<axboe@nelson.home.kernel.dk>
Thu, 4 May 2006 04:55:12 +0000
(06:55 +0200)
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
patch
|
blob
|
blame
|
history
diff --git
a/fs/splice.c
b/fs/splice.c
index 8fa9217ed5858d60e1069ab78b545a6ece896224..a285fd746dc0d34aa97762a6e138416acae292e7 100644
(file)
--- a/
fs/splice.c
+++ b/
fs/splice.c
@@
-324,6
+324,8
@@
__generic_file_splice_read(struct file *in, loff_t *ppos,
mapping_gfp_mask(mapping));
if (unlikely(error)) {
page_cache_release(page);
+ if (error == -EEXIST)
+ continue;
break;
}
/*