diff options
Diffstat (limited to 'fs/splice.c')
-rw-r--r-- | fs/splice.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/splice.c b/fs/splice.c index 14cb602d9a2f..98412721f056 100644 --- a/fs/splice.c +++ b/fs/splice.c | |||
@@ -1356,7 +1356,7 @@ SYSCALL_DEFINE4(vmsplice, int, fd, const struct iovec __user *, uiov, | |||
1356 | struct iovec iovstack[UIO_FASTIOV]; | 1356 | struct iovec iovstack[UIO_FASTIOV]; |
1357 | struct iovec *iov = iovstack; | 1357 | struct iovec *iov = iovstack; |
1358 | struct iov_iter iter; | 1358 | struct iov_iter iter; |
1359 | long error; | 1359 | ssize_t error; |
1360 | struct fd f; | 1360 | struct fd f; |
1361 | int type; | 1361 | int type; |
1362 | 1362 | ||
@@ -1367,7 +1367,7 @@ SYSCALL_DEFINE4(vmsplice, int, fd, const struct iovec __user *, uiov, | |||
1367 | 1367 | ||
1368 | error = import_iovec(type, uiov, nr_segs, | 1368 | error = import_iovec(type, uiov, nr_segs, |
1369 | ARRAY_SIZE(iovstack), &iov, &iter); | 1369 | ARRAY_SIZE(iovstack), &iov, &iter); |
1370 | if (!error) { | 1370 | if (error >= 0) { |
1371 | error = do_vmsplice(f.file, &iter, flags); | 1371 | error = do_vmsplice(f.file, &iter, flags); |
1372 | kfree(iov); | 1372 | kfree(iov); |
1373 | } | 1373 | } |
@@ -1382,7 +1382,7 @@ COMPAT_SYSCALL_DEFINE4(vmsplice, int, fd, const struct compat_iovec __user *, io | |||
1382 | struct iovec iovstack[UIO_FASTIOV]; | 1382 | struct iovec iovstack[UIO_FASTIOV]; |
1383 | struct iovec *iov = iovstack; | 1383 | struct iovec *iov = iovstack; |
1384 | struct iov_iter iter; | 1384 | struct iov_iter iter; |
1385 | long error; | 1385 | ssize_t error; |
1386 | struct fd f; | 1386 | struct fd f; |
1387 | int type; | 1387 | int type; |
1388 | 1388 | ||
@@ -1393,7 +1393,7 @@ COMPAT_SYSCALL_DEFINE4(vmsplice, int, fd, const struct compat_iovec __user *, io | |||
1393 | 1393 | ||
1394 | error = compat_import_iovec(type, iov32, nr_segs, | 1394 | error = compat_import_iovec(type, iov32, nr_segs, |
1395 | ARRAY_SIZE(iovstack), &iov, &iter); | 1395 | ARRAY_SIZE(iovstack), &iov, &iter); |
1396 | if (!error) { | 1396 | if (error >= 0) { |
1397 | error = do_vmsplice(f.file, &iter, flags); | 1397 | error = do_vmsplice(f.file, &iter, flags); |
1398 | kfree(iov); | 1398 | kfree(iov); |
1399 | } | 1399 | } |