]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/staging/smbfs/inode.c
Merge branches 'irq-core-for-linus' and 'core-locking-for-linus' of git://git.kernel...
[karo-tx-linux.git] / drivers / staging / smbfs / inode.c
similarity index 97%
rename from fs/smbfs/inode.c
rename to drivers/staging/smbfs/inode.c
index 450c9194198861483daa183fb6582e1c9790eadb..540a984bb5160d5942902575803c6c79b087d507 100644 (file)
 #include <linux/vfs.h>
 #include <linux/highuid.h>
 #include <linux/sched.h>
-#include <linux/smb_fs.h>
-#include <linux/smbno.h>
-#include <linux/smb_mount.h>
 
 #include <asm/system.h>
 #include <asm/uaccess.h>
 
+#include "smb_fs.h"
+#include "smbno.h"
+#include "smb_mount.h"
 #include "smb_debug.h"
 #include "getopt.h"
 #include "proto.h"
@@ -229,7 +229,6 @@ smb_invalidate_inodes(struct smb_sb_info *server)
 {
        VERBOSE("\n");
        shrink_dcache_sb(SB_of(server));
-       invalidate_inodes(SB_of(server));
 }
 
 /*
@@ -501,10 +500,12 @@ static int smb_fill_super(struct super_block *sb, void *raw_data, int silent)
        void *mem;
        static int warn_count;
 
+       lock_kernel();
+
        if (warn_count < 5) {
                warn_count++;
                printk(KERN_EMERG "smbfs is deprecated and will be removed"
-                       " from the 2.6.27 kernel. Please migrate to cifs\n");
+                       " from the 2.6.37 kernel. Please migrate to cifs\n");
        }
 
        if (!raw_data)
@@ -536,7 +537,7 @@ static int smb_fill_super(struct super_block *sb, void *raw_data, int silent)
        server->mnt = NULL;
        server->sock_file = NULL;
        init_waitqueue_head(&server->conn_wq);
-       init_MUTEX(&server->sem);
+       sema_init(&server->sem, 1);
        INIT_LIST_HEAD(&server->entry);
        INIT_LIST_HEAD(&server->xmitq);
        INIT_LIST_HEAD(&server->recvq);
@@ -621,6 +622,7 @@ static int smb_fill_super(struct super_block *sb, void *raw_data, int silent)
 
        smb_new_dentry(sb->s_root);
 
+       unlock_kernel();
        return 0;
 
 out_no_root:
@@ -643,9 +645,11 @@ out_wrong_data:
 out_no_data:
        printk(KERN_ERR "smb_fill_super: missing data argument\n");
 out_fail:
+       unlock_kernel();
        return -EINVAL;
 out_no_server:
        printk(KERN_ERR "smb_fill_super: cannot allocate struct smb_sb_info\n");
+       unlock_kernel();
        return -ENOMEM;
 }
 
@@ -789,16 +793,16 @@ out:
        return error;
 }
 
-static int smb_get_sb(struct file_system_type *fs_type,
-       int flags, const char *dev_name, void *data, struct vfsmount *mnt)
+static struct dentry *smb_mount(struct file_system_type *fs_type,
+       int flags, const char *dev_name, void *data)
 {
-       return get_sb_nodev(fs_type, flags, data, smb_fill_super, mnt);
+       return mount_nodev(fs_type, flags, data, smb_fill_super);
 }
 
 static struct file_system_type smb_fs_type = {
        .owner          = THIS_MODULE,
        .name           = "smbfs",
-       .get_sb         = smb_get_sb,
+       .mount          = smb_mount,
        .kill_sb        = kill_anon_super,
        .fs_flags       = FS_BINARY_MOUNTDATA,
 };