patch-2.4.14 linux/fs/char_dev.c
Next file: linux/fs/cramfs/Makefile
Previous file: linux/fs/buffer.c
Back to the patch index
Back to the overall index
- Lines: 10
- Date:
Fri Nov 2 11:48:21 2001
- Orig file:
v2.4.13/linux/fs/char_dev.c
- Orig date:
Tue May 22 09:35:42 2001
diff -u --recursive --new-file v2.4.13/linux/fs/char_dev.c linux/fs/char_dev.c
@@ -104,8 +104,7 @@
void cdput(struct char_device *cdev)
{
- if (atomic_dec_and_test(&cdev->count)) {
- spin_lock(&cdev_lock);
+ if (atomic_dec_and_lock(&cdev->count, &cdev_lock)) {
list_del(&cdev->hash);
spin_unlock(&cdev_lock);
destroy_cdev(cdev);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)