Skip to content

Commit 63980d4

Browse files
authored
Merge pull request #4 from rota1001/fix-producer-stopping-condition
Fix incorrect open count check in release function
2 parents 19ec2e5 + e98d519 commit 63980d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ static int kxo_open(struct inode *inode, struct file *filp)
428428
static int kxo_release(struct inode *inode, struct file *filp)
429429
{
430430
pr_debug("kxo: %s\n", __func__);
431-
if (atomic_dec_and_test(&open_cnt) == 0) {
431+
if (atomic_dec_and_test(&open_cnt)) {
432432
del_timer_sync(&timer);
433433
flush_workqueue(kxo_workqueue);
434434
fast_buf_clear();

0 commit comments

Comments
 (0)