X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=module%2Fzfs%2Fzfs_vnops.c;h=5b47cba7f6cd6a05644b0bc267cb15ce7fa92d86;hb=36391312afdfac5584ca40ef1af7721108ce4c20;hp=107211f837ac51bbe08a1bdcae87c5712ec99877;hpb=c409e4647f221ab724a0bd10c480ac95447203c3;p=zfs.git diff --git a/module/zfs/zfs_vnops.c b/module/zfs/zfs_vnops.c index 107211f..5b47cba 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;