int err = 0;
struct file *lower_file = NULL;
- lock_kernel();
lower_file = wrapfs_lower_file(file);
if (lower_file->f_op && lower_file->f_op->fasync)
err = lower_file->f_op->fasync(fd, lower_file, flag);
- unlock_kernel();
return err;
}
return err;
}
-static int wrapfs_get_sb(struct file_system_type *fs_type,
- int flags, const char *dev_name,
- void *raw_data, struct vfsmount *mnt)
+struct dentry *wrapfs_mount(struct file_system_type *fs_type, int flags,
+ const char *dev_name, void *raw_data)
{
- int err;
void *lower_path_name = (void *) dev_name;
- err = get_sb_nodev(fs_type, flags, lower_path_name,
- wrapfs_read_super, mnt);
- return err;
+ return mount_nodev(fs_type, flags, lower_path_name,
+ wrapfs_read_super);
}
static struct file_system_type wrapfs_fs_type = {
.owner = THIS_MODULE,
.name = WRAPFS_NAME,
- .get_sb = wrapfs_get_sb,
+ .mount = wrapfs_mount,
.kill_sb = generic_shutdown_super,
.fs_flags = FS_REVAL_DOT,
};
#include <linux/mount.h>
#include <linux/namei.h>
#include <linux/seq_file.h>
-#include <linux/smp_lock.h>
#include <linux/statfs.h>
#include <linux/fs_stack.h>
#include <linux/magic.h>
#include <linux/uaccess.h>
#include <linux/slab.h>
+#include <linux/sched.h>
/* the file system name */
#define WRAPFS_NAME "wrapfs"