mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
Remove unimplemented virus scanning hooks
Reviewed-by: Adam Moss <c@yotes.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Igor Kozhukhov <igor@dilos.org> Signed-off-by: Ryan Moeller <ryan@iXsystems.com> Closes #11972
This commit is contained in:
@@ -569,14 +569,6 @@ snapdir_changed_cb(void *arg, uint64_t newval)
|
||||
zfsvfs->z_show_ctldir = newval;
|
||||
}
|
||||
|
||||
static void
|
||||
vscan_changed_cb(void *arg, uint64_t newval)
|
||||
{
|
||||
zfsvfs_t *zfsvfs = arg;
|
||||
|
||||
zfsvfs->z_vscan = newval;
|
||||
}
|
||||
|
||||
static void
|
||||
acl_mode_changed_cb(void *arg, uint64_t newval)
|
||||
{
|
||||
@@ -738,8 +730,6 @@ zfs_register_callbacks(vfs_t *vfsp)
|
||||
error = error ? error : dsl_prop_register(ds,
|
||||
zfs_prop_to_name(ZFS_PROP_ACLINHERIT), acl_inherit_changed_cb,
|
||||
zfsvfs);
|
||||
error = error ? error : dsl_prop_register(ds,
|
||||
zfs_prop_to_name(ZFS_PROP_VSCAN), vscan_changed_cb, zfsvfs);
|
||||
dsl_pool_config_exit(dmu_objset_pool(os), FTAG);
|
||||
if (error)
|
||||
goto unregister;
|
||||
|
||||
@@ -231,15 +231,6 @@ zfs_open(vnode_t **vpp, int flag, cred_t *cr)
|
||||
return (SET_ERROR(EPERM));
|
||||
}
|
||||
|
||||
if (!zfs_has_ctldir(zp) && zp->z_zfsvfs->z_vscan &&
|
||||
ZTOV(zp)->v_type == VREG &&
|
||||
!(zp->z_pflags & ZFS_AV_QUARANTINED) && zp->z_size > 0) {
|
||||
if (fs_vscan(*vpp, cr, 0) != 0) {
|
||||
ZFS_EXIT(zfsvfs);
|
||||
return (SET_ERROR(EACCES));
|
||||
}
|
||||
}
|
||||
|
||||
/* Keep a count of the synchronous opens in the znode */
|
||||
if (flag & (FSYNC | FDSYNC))
|
||||
atomic_inc_32(&zp->z_sync_cnt);
|
||||
@@ -262,11 +253,6 @@ zfs_close(vnode_t *vp, int flag, int count, offset_t offset, cred_t *cr)
|
||||
if ((flag & (FSYNC | FDSYNC)) && (count == 1))
|
||||
atomic_dec_32(&zp->z_sync_cnt);
|
||||
|
||||
if (!zfs_has_ctldir(zp) && zp->z_zfsvfs->z_vscan &&
|
||||
ZTOV(zp)->v_type == VREG &&
|
||||
!(zp->z_pflags & ZFS_AV_QUARANTINED) && zp->z_size > 0)
|
||||
VERIFY0(fs_vscan(vp, cr, 1));
|
||||
|
||||
ZFS_EXIT(zfsvfs);
|
||||
return (0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user