And use ARRAY_SIZE for easier code modification if we ever need in future.

CC: Al Viro <v...@zeniv.linux.org.uk>
Signed-off-by: Cyrill Gorcunov <gorcu...@gmail.com>
---
 fs/splice.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: linux-next.git/fs/splice.c
===================================================================
--- linux-next.git.orig/fs/splice.c
+++ linux-next.git/fs/splice.c
@@ -1203,12 +1203,12 @@ static int iter_to_pipe(struct iov_iter
        bool failed = false;
 
        while (iov_iter_count(from) && !failed) {
-               struct page *pages[16];
+               struct page *pages[PIPE_DEF_BUFFERS];
                ssize_t copied;
                size_t start;
                int n;
 
-               copied = iov_iter_get_pages(from, pages, ~0UL, 16, &start);
+               copied = iov_iter_get_pages(from, pages, ~0UL, 
ARRAY_SIZE(pages), &start);
                if (copied <= 0) {
                        ret = copied;
                        break;

Reply via email to