Example #1
0
/*
 * FEM oplock monitors
 *
 * The monitors below are not intended to intercept CIFS calls.
 * CIFS higher-level routines will break oplocks as needed prior
 * to getting to the VFS layer.
 */
static int
smb_fem_oplock_open(
    femarg_t		*arg,
    int			mode,
    cred_t		*cr,
    caller_context_t	*ct)
{
	int	rc;

	rc = smb_fem_oplock_break(arg, ct);
	if (rc == 0)
		rc = vnext_open(arg, mode, cr, ct);
	return (rc);
}
Example #2
0
/*
 * FEM oplock monitors
 *
 * The monitors below are not intended to intercept CIFS calls.
 * CIFS higher-level routines will break oplocks as needed prior
 * to getting to the VFS layer.
 */
static int
smb_fem_oplock_open(
    femarg_t		*arg,
    int			mode,
    cred_t		*cr,
    caller_context_t	*ct)
{
	uint32_t	flags;
	int		rc = 0;

	if (ct != &smb_ct) {
		if (mode & (FWRITE|FTRUNC))
			flags = SMB_OPLOCK_BREAK_TO_NONE;
		else
			flags = SMB_OPLOCK_BREAK_TO_LEVEL_II;
		rc = smb_fem_oplock_break(arg, ct, flags);
	}
	if (rc == 0)
		rc = vnext_open(arg, mode, cr, ct);

	return (rc);
}