]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - fs/notify/fanotify/fanotify_user.c
fsnotify: add group priorities
[net-next-2.6.git] / fs / notify / fanotify / fanotify_user.c
index 9fe760baf69fcd35c9bd1e2cbc70d5045fad8815..84d3e2047de31792ed49ae8ee3430a44c2211567 100644 (file)
@@ -463,8 +463,6 @@ SYSCALL_DEFINE3(fanotify_init, unsigned int, flags, unsigned int, event_f_flags,
 
        if (event_f_flags)
                return -EINVAL;
-       if (priority)
-               return -EINVAL;
 
        if (!capable(CAP_SYS_ADMIN))
                return -EACCES;
@@ -483,6 +481,8 @@ SYSCALL_DEFINE3(fanotify_init, unsigned int, flags, unsigned int, event_f_flags,
        if (IS_ERR(group))
                return PTR_ERR(group);
 
+       group->priority = priority;
+
        fd = anon_inode_getfd("[fanotify]", &fanotify_fops, group, f_flags);
        if (fd < 0)
                goto out_put_group;