Пример #1
0
static int
smb_fem_oplock_rwlock(
    femarg_t		*arg,
    int			write_lock,
    caller_context_t	*ct)
{
	if (write_lock) {
		int	rc;

		rc = smb_fem_oplock_break(arg, ct);
		if (rc != 0)
			return (rc);
	}
	return (vnext_rwlock(arg, write_lock, ct));
}
Пример #2
0
static int
smb_fem_oplock_rwlock(
    femarg_t		*arg,
    int			write_lock,
    caller_context_t	*ct)
{
	uint32_t	flags;
	int		rc = 0;

	if (ct != &smb_ct) {
		if (write_lock)
			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_rwlock(arg, write_lock, ct);

	return (rc);
}