コード例 #1
0
ファイル: smb_fem.c プロジェクト: mikess/illumos-gate
static int
smb_fem_oplock_vnevent(
    femarg_t		*arg,
    vnevent_t		vnevent,
    vnode_t		*dvp,
    char		*name,
    caller_context_t	*ct)
{
	uint32_t	flags;
	int		rc = 0;

	if (ct != &smb_ct) {
		switch (vnevent) {
		case VE_REMOVE:
		case VE_RENAME_DEST:
			flags = SMB_OPLOCK_BREAK_TO_NONE |
			    SMB_OPLOCK_BREAK_BATCH;
			rc = smb_fem_oplock_break(arg, ct, flags);
			break;
		case VE_RENAME_SRC:
			flags = SMB_OPLOCK_BREAK_TO_LEVEL_II |
			    SMB_OPLOCK_BREAK_BATCH;
			rc = smb_fem_oplock_break(arg, ct, flags);
			break;
		default:
			rc = 0;
			break;
		}
	}
	if (rc == 0)
		rc = vnext_vnevent(arg, vnevent, dvp, name, ct);

	return (rc);
}
コード例 #2
0
static int
smb_fem_oplock_vnevent(
    femarg_t		*arg,
    vnevent_t		vnevent,
    vnode_t		*dvp,
    char		*name,
    caller_context_t	*ct)
{
	int	rc;

	switch (vnevent) {
	case VE_REMOVE:
	case VE_RENAME_DEST:
	case VE_RENAME_SRC:
		rc = smb_fem_oplock_break(arg, ct);
		if (rc != 0)
			return (rc);
		break;

	default:
		break;
	}
	return (vnext_vnevent(arg, vnevent, dvp, name, ct));
}