184 zfs_putpage() optimization
Reviewed by:
[email protected]
Reviewed by:
[email protected]
Approved by:
[email protected]
--- a/usr/src/uts/common/fs/zfs/zfs_vnops.c Sat Feb 05 21:07:28 2011 -0500
+++ b/usr/src/uts/common/fs/zfs/zfs_vnops.c Mon Feb 07 14:16:27 2011 -0800
@@ -4193,6 +4193,15 @@
ZFS_VERIFY_ZP(zp);
/*
+ * There's nothing to do if no data is cached.
+ */
+ if (!vn_has_cached_data(vp)) {
+ ASSERT(len == 0);
+ ZFS_EXIT(zfsvfs);
+ return (0);
+ }
+
+ /*
* Align this request to the file block size in case we kluster.
* XXX - this can result in pretty aggresive locking, which can
* impact simultanious read/write access. One option might be