Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Kernel v2.4.13-ac8 /fs/char_dev.c

Filename:/fs/char_dev.c
Lines Added:1
Lines Deleted:2
Also changed in: (Previous) 2.4.5  2.4.5-pre6  2.4.5-pre5  2.4.4-ac18  2.4.4-ac16  2.4.4-ac17 
(Following) 2.4.14  2.5.48  2.5.49  2.5.59bk3  2.5.59bk4  2.5.60 

Location
[  2.4.13-ac8
  [  fs
     o  char_dev.c

Patch

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/fs/char_dev.c linux.ac/fs/char_dev.c
--- linux.vanilla/fs/char_dev.c   Tue May 22 17:35:42 2001
+++ linux.ac/fs/char_dev.c   Sat Nov  3 19:10:30 2001
@@ -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);


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.