kernel: fix build (#609)

Co-authored-by: ShirkNeko <109797057+ShirkNeko@users.noreply.github.com>
This commit is contained in:
LeafStative
2025-11-20 17:07:33 +08:00
committed by GitHub
parent 3ac63edd18
commit 05758a975b
3 changed files with 6 additions and 4 deletions

View File

@@ -66,16 +66,16 @@ static int add_mark_on_inode(struct inode *inode, u32 mask,
if (!m)
return -ENOMEM;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 17, 0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 18, 0)
fsnotify_init_mark(m, g);
m->mask = mask;
ret = fsnotify_add_inode_mark(m, inode, 0);
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
fsnotify_init_mark(m, g);
m->mask = mask;
ret = fsnotify_add_mark(m, inode, NULL, 0);
#else
fsnotify_init_mark(m, g, m_free);
fsnotify_init_mark(m, m_free);
m->mask = mask;
ret = fsnotify_add_mark(m, g, inode, NULL, 0);
#endif