summaryrefslogtreecommitdiffstats
path: root/module/zfs/zfs_vnops.c
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2011-05-13 08:16:10 -0700
committerBrian Behlendorf <[email protected]>2011-05-13 08:20:06 -0700
commite814770f2ed14808c7ea8cf8cea034aacb20564a (patch)
tree7269f195b4939f9e70ad08dfc3bd984ccc32a541 /module/zfs/zfs_vnops.c
parent6f582dc708e713f1d5e1c6871657ac726873b4bf (diff)
Update synchronous open zfs_close() comment
The comment in zfs_close() pertaining to decrementing the synchronous open count needs to be updated for Linux. The code was already updated to be correct, but the comment was missed and is now misleading. Under Linux the zfs_close() hook is only called once when the final reference is dropped. This differs from Solaris where zfs_close() is called for each close. Closes #237
Diffstat (limited to 'module/zfs/zfs_vnops.c')
-rw-r--r--module/zfs/zfs_vnops.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/module/zfs/zfs_vnops.c b/module/zfs/zfs_vnops.c
index 107211f83..5b47cba7f 100644
--- a/module/zfs/zfs_vnops.c
+++ b/module/zfs/zfs_vnops.c
@@ -220,7 +220,11 @@ zfs_close(struct inode *ip, int flag, cred_t *cr)
ZFS_ENTER(zsb);
ZFS_VERIFY_ZP(zp);
- /* Decrement the synchronous opens in the znode */
+ /*
+ * Zero the synchronous opens in the znode. Under Linux the
+ * zfs_close() hook is not symmetric with zfs_open(), it is
+ * only called once when the last reference is dropped.
+ */
if (flag & O_SYNC)
zp->z_sync_cnt = 0;