diff options
Diffstat (limited to 'fs/splice.c')
-rw-r--r-- | fs/splice.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/fs/splice.c b/fs/splice.c index ec11c52d646d..8f1dfaecc8f0 100644 --- a/fs/splice.c +++ b/fs/splice.c | |||
@@ -399,17 +399,7 @@ __generic_file_splice_read(struct file *in, loff_t *ppos, | |||
399 | * If the page isn't uptodate, we may need to start io on it | 399 | * If the page isn't uptodate, we may need to start io on it |
400 | */ | 400 | */ |
401 | if (!PageUptodate(page)) { | 401 | if (!PageUptodate(page)) { |
402 | /* | 402 | lock_page(page); |
403 | * If in nonblock mode then dont block on waiting | ||
404 | * for an in-flight io page | ||
405 | */ | ||
406 | if (flags & SPLICE_F_NONBLOCK) { | ||
407 | if (!trylock_page(page)) { | ||
408 | error = -EAGAIN; | ||
409 | break; | ||
410 | } | ||
411 | } else | ||
412 | lock_page(page); | ||
413 | 403 | ||
414 | /* | 404 | /* |
415 | * Page was truncated, or invalidated by the | 405 | * Page was truncated, or invalidated by the |