]> granicus.if.org Git - zfs/commitdiff
Reintroduce uio_prefaultpages()
authorRichard Yao <ryao@gentoo.org>
Mon, 2 Sep 2013 04:22:30 +0000 (00:22 -0400)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 29 Oct 2013 22:06:18 +0000 (15:06 -0700)
This was accidentally removed by overzealous commenting.

Signed-off-by: Richard Yao <ryao@gentoo.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #1775

module/zfs/zfs_vnops.c

index 423ca3800d603f59e149ec7e96792098de044521..5ff1fdee29e48323c4f64ebd2555f1f4725b257a 100644 (file)
@@ -650,18 +650,18 @@ zfs_write(struct inode *ip, uio_t *uio, int ioflag, cred_t *cr)
                return (EAGAIN);
        }
 
-#ifdef HAVE_UIO_ZEROCOPY
        /*
         * Pre-fault the pages to ensure slow (eg NFS) pages
         * don't hold up txg.
         * Skip this if uio contains loaned arc_buf.
         */
+#ifdef HAVE_UIO_ZEROCOPY
        if ((uio->uio_extflg == UIO_XUIO) &&
            (((xuio_t *)uio)->xu_type == UIOTYPE_ZEROCOPY))
                xuio = (xuio_t *)uio;
        else
+#endif
                uio_prefaultpages(MIN(n, max_blksz), uio);
-#endif /* HAVE_UIO_ZEROCOPY */
 
        /*
         * If in append mode, set the io offset pointer to eof.