aboutsummaryrefslogtreecommitdiffstats
path: root/fs/splice.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/splice.c')
-rw-r--r--fs/splice.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/splice.c b/fs/splice.c
index 5428b0ff3b6f..2282650bdbe8 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -378,10 +378,11 @@ __generic_file_splice_read(struct file *in, loff_t *ppos,
378 * If in nonblock mode then dont block on waiting 378 * If in nonblock mode then dont block on waiting
379 * for an in-flight io page 379 * for an in-flight io page
380 */ 380 */
381 if (flags & SPLICE_F_NONBLOCK) 381 if (flags & SPLICE_F_NONBLOCK) {
382 break; 382 if (TestSetPageLocked(page))
383 383 break;
384 lock_page(page); 384 } else
385 lock_page(page);
385 386
386 /* 387 /*
387 * page was truncated, stop here. if this isn't the 388 * page was truncated, stop here. if this isn't the