do not forbid other processes to use the pwqr fd.
[~madcoder/pwqr.git] / kernel / pwqr.c
index 8592a00..a6ff8e5 100644 (file)
@@ -60,7 +60,6 @@ struct pwqr_sb {
        struct rcu_head         rcu;
        struct timer_list       timer;
        wait_queue_head_t       wqh;
-       pid_t                   tgid;
 
        unsigned                concurrency;
        unsigned                registered;
@@ -149,8 +148,7 @@ static struct pwqr_sb *pwqr_sb_create(void)
 
        kref_init(&sb->kref);
        init_waitqueue_head(&sb->wqh);
-       sb->tgid        = current->tgid;
-       sb->concurrency = num_online_cpus();
+       sb->concurrency    = num_online_cpus();
        init_timer(&sb->timer);
        sb->timer.function = pwqr_sb_timer_cb;
        sb->timer.data     = (unsigned long)sb;
@@ -374,7 +372,7 @@ static int pwqr_release(struct inode *inode, struct file *filp)
 
 static long
 do_pwqr_wait(struct pwqr_sb *sb, struct pwqr_task *pwqt,
-           int is_wait, struct pwqr_ioc_wait __user *arg)
+            int is_wait, struct pwqr_ioc_wait __user *arg)
 {
        unsigned long flags;
        struct pwqr_ioc_wait wait;
@@ -563,9 +561,6 @@ static long pwqr_ioctl(struct file *filp, unsigned command, unsigned long arg)
        struct pwqr_task   *pwqt;
        int rc = 0;
 
-       if (sb->tgid != current->tgid)
-               return -EBADFD;
-
        switch (command) {
        case PWQR_GET_CONC:
                return sb->concurrency;