From 283b940d1cf324b0ade5dba0926443b2d717a4a9 Mon Sep 17 00:00:00 2001 From: Erez Zadok Date: Fri, 18 Mar 2011 00:45:17 -0400 Subject: [PATCH] Wrapfs: port to 2.6.39 Remove lock/unlock_kernel in ->fasync. Convert from ->get_sb to ->mount op. Remove include to smp_lock.h, added sched.h. Signed-off-by: Erez Zadok --- fs/wrapfs/file.c | 2 -- fs/wrapfs/main.c | 13 +++++-------- fs/wrapfs/wrapfs.h | 2 +- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/fs/wrapfs/file.c b/fs/wrapfs/file.c index e837637797eb..e16b21c556b7 100644 --- a/fs/wrapfs/file.c +++ b/fs/wrapfs/file.c @@ -254,11 +254,9 @@ static int wrapfs_fasync(int fd, struct file *file, int flag) 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; } diff --git a/fs/wrapfs/main.c b/fs/wrapfs/main.c index d9249f15f14d..6281840432ce 100644 --- a/fs/wrapfs/main.c +++ b/fs/wrapfs/main.c @@ -131,22 +131,19 @@ out: 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, }; diff --git a/fs/wrapfs/wrapfs.h b/fs/wrapfs/wrapfs.h index 385ed433bfad..7e5605bc5dbe 100644 --- a/fs/wrapfs/wrapfs.h +++ b/fs/wrapfs/wrapfs.h @@ -19,12 +19,12 @@ #include #include #include -#include #include #include #include #include #include +#include /* the file system name */ #define WRAPFS_NAME "wrapfs" -- 2.34.1