]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_io: remove useless do_preadv and do_pwritev arguments
authorZorro Lang <zlang@redhat.com>
Tue, 9 Oct 2018 16:49:47 +0000 (11:49 -0500)
committerEric Sandeen <sandeen@redhat.com>
Tue, 9 Oct 2018 16:49:47 +0000 (11:49 -0500)
do_preadv and do_pwritev all have a 'buffer_size' argument, but they
never used it. Instead of it, they use global 'buffersize' variable,
which is initialized in alloc_buffer(). As the 'buffer_size' is
useless, so remove it for clear code.

Signed-off-by: Zorro Lang <zlang@redhat.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
io/pread.c
io/pwrite.c

index 1e457f049781b7b88c26aff162d35a7a12ab6a03..e5733775a16839209bc311cbd0bb983d48c3fe79 100644 (file)
@@ -164,8 +164,7 @@ static ssize_t
 do_preadv(
        int             fd,
        off64_t         offset,
-       size_t          count,
-       size_t          buffer_size)
+       size_t          count)
 {
        int             vecs = 0;
        ssize_t         oldlen = 0;
@@ -193,7 +192,7 @@ do_preadv(
        return bytes;
 }
 #else
-#define do_preadv(fd, offset, count, buffer_size) (0)
+#define do_preadv(fd, offset, count) (0)
 #endif
 
 static ssize_t
@@ -206,7 +205,7 @@ do_pread(
        if (!vectors)
                return pread(fd, buffer, min(count, buffer_size), offset);
 
-       return do_preadv(fd, offset, count, buffer_size);
+       return do_preadv(fd, offset, count);
 }
 
 static int
index 54a07843fbc06b65aecc8309b5b95399b2df498f..34235ca38d907aa82e51bb65af0054bc16bc9138 100644 (file)
@@ -55,7 +55,6 @@ do_pwritev(
        int             fd,
        off64_t         offset,
        size_t          count,
-       size_t          buffer_size,
        int             pwritev2_flags)
 {
        int vecs = 0;
@@ -91,7 +90,7 @@ do_pwritev(
        return bytes;
 }
 #else
-#define do_pwritev(fd, offset, count, buffer_size, pwritev2_flags) (0)
+#define do_pwritev(fd, offset, count, pwritev2_flags) (0)
 #endif
 
 static ssize_t
@@ -105,7 +104,7 @@ do_pwrite(
        if (!vectors)
                return pwrite(fd, buffer, min(count, buffer_size), offset);
 
-       return do_pwritev(fd, offset, count, buffer_size, pwritev2_flags);
+       return do_pwritev(fd, offset, count, pwritev2_flags);
 }
 
 static int