* Copyright 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
+/*
+ * Copyright (c) 2012 by Delphix. All rights reserved.
+ */
/*
* This file contains the code to implement file range locking in
rl_t *rl;
ASSERT(len);
- rl = kmem_alloc(sizeof (rl_t), KM_SLEEP);
+ rl = kmem_alloc(sizeof (rl_t), KM_PUSHPAGE);
rl->r_off = off;
rl->r_len = len;
rl->r_cnt = 1;
list_insert_tail(free_list, remove);
} else {
- ASSERT3U(remove->r_cnt, ==, 0);
- ASSERT3U(remove->r_write_wanted, ==, 0);
- ASSERT3U(remove->r_read_wanted, ==, 0);
+ ASSERT0(remove->r_cnt);
+ ASSERT0(remove->r_write_wanted);
+ ASSERT0(remove->r_read_wanted);
/*
* Find start proxy representing this reader lock,
* then decrement ref count on all proxies