Sigh more compat fixes, this is almost right for 2.6.9 - 2.6.26 kernels.

git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@157 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c
This commit is contained in:
behlendo
2008-08-11 23:47:44 +00:00
parent b61a6e8bdc
commit 25557fd884
6 changed files with 32 additions and 19 deletions
+5 -3
View File
@@ -43,6 +43,7 @@
#include "splat-internal.h"
static spl_class *splat_class;
static spl_device *splat_device;
static struct list_head splat_module_list;
static spinlock_t splat_module_lock;
@@ -630,8 +631,9 @@ splat_init(void)
goto error;
}
spl_device_create(splat_class, NULL, MKDEV(SPLAT_MAJOR, 0),
NULL, SPLAT_NAME);
splat_device = spl_device_create(splat_class, NULL,
MKDEV(SPLAT_MAJOR, 0),
NULL, SPLAT_NAME);
printk(KERN_INFO "splat: Loaded Solaris Porting LAyer "
"Tests v%s\n", VERSION);
@@ -646,7 +648,7 @@ splat_fini(void)
{
dev_t dev = MKDEV(SPLAT_MAJOR, 0);
spl_device_destroy(splat_class, dev);
spl_device_destroy(splat_class, splat_device, dev);
spl_class_destroy(splat_class);
cdev_del(&splat_cdev);
unregister_chrdev_region(dev, SPLAT_MINORS);
+2 -1
View File
@@ -354,10 +354,10 @@ fd_uninstall(int fd)
{
struct file *fp;
struct files_struct *files = current->files;
#ifdef HAVE_FILES_FDTABLE
struct fdtable *fdt;
spin_lock(&files->file_lock);
#ifdef HAVE_FILES_FDTABLE
fdt = files_fdtable(files);
if (fd >= fdt->max_fds)
@@ -370,6 +370,7 @@ fd_uninstall(int fd)
rcu_assign_pointer(fdt->fd[fd], NULL);
FD_CLR(fd, fdt->close_on_exec);
#else
spin_lock(&files->file_lock);
if (fd >= files->max_fds)
goto out_unlock;