Skip to content

Commit 8b418af

Browse files
committed
Drop .owner for kernel >= 6.4
Kernel 6.4+ sets .owner automatically. Remove manual assignment to avoid build issues and keep compatibility with older versions.
1 parent c1d5f45 commit 8b418af

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: main.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -441,11 +441,13 @@ static int kxo_release(struct inode *inode, struct file *filp)
441441
}
442442

443443
static const struct file_operations kxo_fops = {
444+
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0)
445+
.owner = THIS_MODULE,
446+
#endif
444447
.read = kxo_read,
445448
.llseek = no_llseek,
446449
.open = kxo_open,
447450
.release = kxo_release,
448-
.owner = THIS_MODULE,
449451
};
450452

451453
static int __init kxo_init(void)

0 commit comments

Comments
 (0)