STATIC void xfs_ioend_wake( xfs_inode_t *ip) { if (atomic_dec_and_test(&ip->i_iocount)) wake_up(to_ioend_wq(ip)); }
void xfs_ioend_wait( xfs_inode_t *ip) { wait_queue_head_t *wq = to_ioend_wq(ip); wait_event(*wq, (atomic_read(&ip->i_iocount) == 0)); }
void ext4_free_io_end(ext4_io_end_t *io) { int i; wait_queue_head_t *wq; BUG_ON(!io); if (io->page) put_page(io->page); for (i = 0; i < io->num_io_pages; i++) put_io_page(io->pages[i]); io->num_io_pages = 0; wq = to_ioend_wq(io->inode); if (atomic_dec_and_test(&EXT4_I(io->inode)->i_ioend_count) && waitqueue_active(wq)) wake_up_all(wq); kmem_cache_free(io_end_cachep, io); }
void ext4_ioend_wait(struct inode *inode) { wait_queue_head_t *wq = to_ioend_wq(inode); wait_event(*wq, (atomic_read(&EXT4_I(inode)->i_ioend_count) == 0)); }