Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7cbbb758 authored by Eric Dumazet's avatar Eric Dumazet Committed by Dmitry Torokhov
Browse files

Input: remove useless synchronize_rcu() calls



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: default avatarEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent 1201e7e6
Loading
Loading
Loading
Loading
+0 −2
Original line number Original line Diff line number Diff line
@@ -164,7 +164,6 @@ static int evdev_grab(struct evdev *evdev, struct evdev_client *client)
		return error;
		return error;


	rcu_assign_pointer(evdev->grab, client);
	rcu_assign_pointer(evdev->grab, client);
	synchronize_rcu();


	return 0;
	return 0;
}
}
@@ -187,7 +186,6 @@ static void evdev_attach_client(struct evdev *evdev,
	spin_lock(&evdev->client_lock);
	spin_lock(&evdev->client_lock);
	list_add_tail_rcu(&client->node, &evdev->client_list);
	list_add_tail_rcu(&client->node, &evdev->client_list);
	spin_unlock(&evdev->client_lock);
	spin_unlock(&evdev->client_lock);
	synchronize_rcu();
}
}


static void evdev_detach_client(struct evdev *evdev,
static void evdev_detach_client(struct evdev *evdev,
+0 −1
Original line number Original line Diff line number Diff line
@@ -451,7 +451,6 @@ int input_grab_device(struct input_handle *handle)
	}
	}


	rcu_assign_pointer(dev->grab, handle);
	rcu_assign_pointer(dev->grab, handle);
	synchronize_rcu();


 out:
 out:
	mutex_unlock(&dev->mutex);
	mutex_unlock(&dev->mutex);
+0 −1
Original line number Original line Diff line number Diff line
@@ -180,7 +180,6 @@ static void joydev_attach_client(struct joydev *joydev,
	spin_lock(&joydev->client_lock);
	spin_lock(&joydev->client_lock);
	list_add_tail_rcu(&client->node, &joydev->client_list);
	list_add_tail_rcu(&client->node, &joydev->client_list);
	spin_unlock(&joydev->client_lock);
	spin_unlock(&joydev->client_lock);
	synchronize_rcu();
}
}


static void joydev_detach_client(struct joydev *joydev,
static void joydev_detach_client(struct joydev *joydev,
+0 −1
Original line number Original line Diff line number Diff line
@@ -508,7 +508,6 @@ static void mousedev_attach_client(struct mousedev *mousedev,
	spin_lock(&mousedev->client_lock);
	spin_lock(&mousedev->client_lock);
	list_add_tail_rcu(&client->node, &mousedev->client_list);
	list_add_tail_rcu(&client->node, &mousedev->client_list);
	spin_unlock(&mousedev->client_lock);
	spin_unlock(&mousedev->client_lock);
	synchronize_rcu();
}
}


static void mousedev_detach_client(struct mousedev *mousedev,
static void mousedev_detach_client(struct mousedev *mousedev,