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
This commit is contained in:
Brian Behlendorf 2011-05-13 08:16:10 -07:00
parent 6f582dc708
commit e814770f2e
1 changed files with 5 additions and 1 deletions

View File

@ -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;