Skip to content

Commit 8ccb040

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 30aa86d commit 8ccb040

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

main.c

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

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

450452
static int __init kxo_init(void)

0 commit comments

Comments
 (0)