Input: remove useless synchronize_rcu() calls
authorEric Dumazet <eric.dumazet@gmail.com>
Wed, 11 May 2011 22:38:10 +0000 (15:38 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 12 May 2011 15:28:57 +0000 (08:28 -0700)
There is no need to call synchronize_rcu() after a list insertion,
or a NULL->ptr assignment.

However, the reverse operations do need this call.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/evdev.c
drivers/input/input.c
drivers/input/joydev.c
drivers/input/mousedev.c

index 75c4e86830331dbedd933a07b13cc723135df517..be0921ef6b52ace2a2e15a5d1437c6134799dbf0 100644 (file)
@@ -164,7 +164,6 @@ static int evdev_grab(struct evdev *evdev, struct evdev_client *client)
                return error;
 
        rcu_assign_pointer(evdev->grab, client);
-       synchronize_rcu();
 
        return 0;
 }
@@ -187,7 +186,6 @@ static void evdev_attach_client(struct evdev *evdev,
        spin_lock(&evdev->client_lock);
        list_add_tail_rcu(&client->node, &evdev->client_list);
        spin_unlock(&evdev->client_lock);
-       synchronize_rcu();
 }
 
 static void evdev_detach_client(struct evdev *evdev,
index ebbceedc92f4fb8a9f8bc959734be4b442586d01..75e11c7b70fda5fb8d9ecc66a33d3ed460649a01 100644 (file)
@@ -451,7 +451,6 @@ int input_grab_device(struct input_handle *handle)
        }
 
        rcu_assign_pointer(dev->grab, handle);
-       synchronize_rcu();
 
  out:
        mutex_unlock(&dev->mutex);
index 5688b5c88f2491a15b173b0a6f6a6e1c7998a5e5..c24ec2d5f9266cb969bd3a73ea229c08adcc8d9b 100644 (file)
@@ -180,7 +180,6 @@ static void joydev_attach_client(struct joydev *joydev,
        spin_lock(&joydev->client_lock);
        list_add_tail_rcu(&client->node, &joydev->client_list);
        spin_unlock(&joydev->client_lock);
-       synchronize_rcu();
 }
 
 static void joydev_detach_client(struct joydev *joydev,
index 7630273e9474051c3ba4886012e61f1088b43a81..257e033986e40f61ad9a6bcb957439bd5d3f744f 100644 (file)
@@ -508,7 +508,6 @@ static void mousedev_attach_client(struct mousedev *mousedev,
        spin_lock(&mousedev->client_lock);
        list_add_tail_rcu(&client->node, &mousedev->client_list);
        spin_unlock(&mousedev->client_lock);
-       synchronize_rcu();
 }
 
 static void mousedev_detach_client(struct mousedev *mousedev,