Wrapfs: port to 2.6.39
authorErez Zadok <ezk@cs.sunysb.edu>
Fri, 18 Mar 2011 04:45:17 +0000 (00:45 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Tue, 27 Dec 2016 03:52:58 +0000 (22:52 -0500)
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 <ezk@cs.sunysb.edu>
fs/wrapfs/file.c
fs/wrapfs/main.c
fs/wrapfs/wrapfs.h

index e837637797eb2c40486ea8f54f514ecf04385c20..e16b21c556b7a4c2d670f596510f82c5a1ef3942 100644 (file)
@@ -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;
 }
index d9249f15f14d7be92dc756e93a661b1cb0db2d9f..6281840432ce27b053f7b76e5d0b7498f702e61f 100644 (file)
@@ -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,
 };
index 385ed433bfad2529d4644b27a21cc04418204a0f..7e5605bc5dbebada4cfa182f5f5e01610ebb98fb 100644 (file)
 #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"