Lines Matching refs:iobm
54 struct io_bitmap *iobm = tsk->thread.io_bitmap; in io_bitmap_exit() local
58 if (iobm && refcount_dec_and_test(&iobm->refcnt)) in io_bitmap_exit()
59 kfree(iobm); in io_bitmap_exit()
69 struct io_bitmap *iobm; in ksys_ioperm() local
82 iobm = t->io_bitmap; in ksys_ioperm()
83 if (!iobm) { in ksys_ioperm()
87 iobm = kmalloc(sizeof(*iobm), GFP_KERNEL); in ksys_ioperm()
88 if (!iobm) in ksys_ioperm()
91 memset(iobm->bitmap, 0xff, sizeof(iobm->bitmap)); in ksys_ioperm()
92 refcount_set(&iobm->refcnt, 1); in ksys_ioperm()
100 if (refcount_read(&iobm->refcnt) > 1) { in ksys_ioperm()
101 iobm = kmemdup(iobm, sizeof(*iobm), GFP_KERNEL); in ksys_ioperm()
102 if (!iobm) in ksys_ioperm()
104 refcount_set(&iobm->refcnt, 1); in ksys_ioperm()
113 t->io_bitmap = iobm; in ksys_ioperm()
122 bitmap_clear(iobm->bitmap, from, num); in ksys_ioperm()
124 bitmap_set(iobm->bitmap, from, num); in ksys_ioperm()
132 if (iobm->bitmap[i] != ~0UL) in ksys_ioperm()
141 iobm->max = (max_long + 1) * sizeof(unsigned long); in ksys_ioperm()
147 iobm->sequence = atomic64_add_return(1, &io_bitmap_sequence); in ksys_ioperm()