#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"
{
VERBOSE("\n");
shrink_dcache_sb(SB_of(server));
- invalidate_inodes(SB_of(server));
}
/*
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)
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);
smb_new_dentry(sb->s_root);
+ unlock_kernel();
return 0;
out_no_root:
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;
}
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,
};
int o;
+ lock_kernel();
+
save_mount_options(s, options);
sbi = kzalloc(sizeof(*sbi), GFP_KERNEL);
- if (!sbi)
+ if (!sbi) {
+ unlock_kernel();
return -ENOMEM;
+ }
s->s_fs_info = sbi;
sbi->sb_bmp_dir = NULL;
sbi->sb_cp_table = NULL;
-- init_MUTEX(&sbi->hpfs_creation_de);
++ mutex_init(&sbi->hpfs_creation_de);
uid = current_uid();
gid = current_gid();
root->i_blocks = 5;
hpfs_brelse4(&qbh);
}
+ unlock_kernel();
return 0;
bail4: brelse(bh2);
kfree(sbi->sb_cp_table);
s->s_fs_info = NULL;
kfree(sbi);
+ unlock_kernel();
return -EINVAL;
}
--static int hpfs_get_sb(struct file_system_type *fs_type,
-- int flags, const char *dev_name, void *data, struct vfsmount *mnt)
++static struct dentry *hpfs_mount(struct file_system_type *fs_type,
++ int flags, const char *dev_name, void *data)
{
-- return get_sb_bdev(fs_type, flags, dev_name, data, hpfs_fill_super,
-- mnt);
++ return mount_bdev(fs_type, flags, dev_name, data, hpfs_fill_super);
}
static struct file_system_type hpfs_fs_type = {
.owner = THIS_MODULE,
.name = "hpfs",
-- .get_sb = hpfs_get_sb,
++ .mount = hpfs_mount,
.kill_sb = kill_block_super,
.fs_flags = FS_REQUIRES_DEV,
};