Merge to Fedora kernel-2.6.18-1.2224_FC5 patched with stable patch-2.6.18.1-vs2.0...
[linux-2.6.git] / fs / coda / psdev.c
index 6c6771d..803aacf 100644 (file)
@@ -28,7 +28,6 @@
 #include <linux/delay.h>
 #include <linux/skbuff.h>
 #include <linux/proc_fs.h>
-#include <linux/devfs_fs_kernel.h>
 #include <linux/vmalloc.h>
 #include <linux/fs.h>
 #include <linux/file.h>
@@ -259,7 +258,7 @@ static ssize_t coda_psdev_read(struct file * file, char __user * buf,
        /* If request was not a signal, enqueue and don't free */
        if (!(req->uc_flags & REQ_ASYNC)) {
                req->uc_flags |= REQ_READ;
-               list_add(&(req->uc_chain), vcp->vc_processing.prev);
+               list_add_tail(&(req->uc_chain), &vcp->vc_processing);
                goto out;
        }
 
@@ -365,22 +364,12 @@ static int init_coda_psdev(void)
                err = PTR_ERR(coda_psdev_class);
                goto out_chrdev;
        }               
-       devfs_mk_dir ("coda");
-       for (i = 0; i < MAX_CODADEVS; i++) {
+       for (i = 0; i < MAX_CODADEVS; i++)
                class_device_create(coda_psdev_class, NULL,
                                MKDEV(CODA_PSDEV_MAJOR,i), NULL, "cfs%d", i);
-               err = devfs_mk_cdev(MKDEV(CODA_PSDEV_MAJOR, i),
-                               S_IFCHR|S_IRUSR|S_IWUSR, "coda/%d", i);
-               if (err)
-                       goto out_class;
-       }
        coda_sysctl_init();
        goto out;
 
-out_class:
-       for (i = 0; i < MAX_CODADEVS; i++) 
-               class_device_destroy(coda_psdev_class, MKDEV(CODA_PSDEV_MAJOR, i));
-       class_destroy(coda_psdev_class);
 out_chrdev:
        unregister_chrdev(CODA_PSDEV_MAJOR, "coda");
 out:
@@ -419,12 +408,9 @@ static int __init init_coda(void)
        }
        return 0;
 out:
-       for (i = 0; i < MAX_CODADEVS; i++) {
+       for (i = 0; i < MAX_CODADEVS; i++)
                class_device_destroy(coda_psdev_class, MKDEV(CODA_PSDEV_MAJOR, i));
-               devfs_remove("coda/%d", i);
-       }
        class_destroy(coda_psdev_class);
-       devfs_remove("coda");
        unregister_chrdev(CODA_PSDEV_MAJOR, "coda");
        coda_sysctl_clean();
 out1:
@@ -441,12 +427,9 @@ static void __exit exit_coda(void)
         if ( err != 0 ) {
                 printk("coda: failed to unregister filesystem\n");
         }
-       for (i = 0; i < MAX_CODADEVS; i++) {
+       for (i = 0; i < MAX_CODADEVS; i++)
                class_device_destroy(coda_psdev_class, MKDEV(CODA_PSDEV_MAJOR, i));
-               devfs_remove("coda/%d", i);
-       }
        class_destroy(coda_psdev_class);
-       devfs_remove("coda");
        unregister_chrdev(CODA_PSDEV_MAJOR, "coda");
        coda_sysctl_clean();
        coda_destroy_inodecache();