char **out, int *out_len);
static void befs_put_super(struct super_block *);
static int befs_remount(struct super_block *, int *, char *);
-static int befs_statfs(struct dentry *, struct kstatfs *);
+static int befs_statfs(struct super_block *, struct kstatfs *);
static int parse_options(char *, befs_mount_options *);
static const struct super_operations befs_sops = {
/* slab cache for befs_inode_info objects */
static kmem_cache_t *befs_inode_cachep;
-static const struct file_operations befs_dir_operations = {
+static struct file_operations befs_dir_operations = {
.read = generic_read_dir,
.readdir = befs_readdir,
};
.lookup = befs_lookup,
};
-static const struct address_space_operations befs_aops = {
+static struct address_space_operations befs_aops = {
.readpage = befs_readpage,
.sync_page = block_sync_page,
.bmap = befs_bmap,
if (!bh) {
befs_error(sb, "unable to read inode block - "
"inode = %lu", inode->i_ino);
- goto unacquire_none;
+ goto unaquire_none;
}
raw_inode = (befs_inode *) bh->b_data;
if (befs_check_inode(sb, raw_inode, inode->i_ino) != BEFS_OK) {
befs_error(sb, "Bad inode: %lu", inode->i_ino);
- goto unacquire_bh;
+ goto unaquire_bh;
}
inode->i_mode = (umode_t) fs32_to_cpu(sb, raw_inode->mode);
inode->i_mtime.tv_nsec = 0; /* lower 16 bits are not a time */
inode->i_ctime = inode->i_mtime;
inode->i_atime = inode->i_mtime;
+ inode->i_blksize = befs_sb->block_size;
befs_ino->i_inode_num = fsrun_to_cpu(sb, raw_inode->inode_num);
befs_ino->i_parent = fsrun_to_cpu(sb, raw_inode->parent);
befs_error(sb, "Inode %lu is not a regular file, "
"directory or symlink. THAT IS WRONG! BeFS has no "
"on disk special files", inode->i_ino);
- goto unacquire_bh;
+ goto unaquire_bh;
}
brelse(bh);
befs_debug(sb, "<--- befs_read_inode()");
return;
- unacquire_bh:
+ unaquire_bh:
brelse(bh);
- unacquire_none:
+ unaquire_none:
make_bad_inode(inode);
befs_debug(sb, "<--- befs_read_inode() - Bad inode");
return;
{
befs_inode_cachep = kmem_cache_create("befs_inode_cache",
sizeof (struct befs_inode_info),
- 0, (SLAB_RECLAIM_ACCOUNT|
- SLAB_MEM_SPREAD),
+ 0, SLAB_RECLAIM_ACCOUNT,
init_once, NULL);
if (befs_inode_cachep == NULL) {
printk(KERN_ERR "befs_init_inodecache: "
* @sb: Superblock
* @src: Input string buffer in NLS format
* @srclen: Length of input string in bytes
- * @dest: The output string in UTF-8 format
+ * @dest: The output string in UTF8 format
* @destlen: Length of the output buffer
*
* Converts input string @src, which is in the format of the loaded NLS map,
printk(KERN_ERR
"BeFS(%s): Unable to allocate memory for private "
"portion of superblock. Bailing.\n", sb->s_id);
- goto unacquire_none;
+ goto unaquire_none;
}
befs_sb = BEFS_SB(sb);
memset(befs_sb, 0, sizeof(befs_sb_info));
if (!parse_options((char *) data, &befs_sb->mount_opts)) {
befs_error(sb, "cannot parse mount options");
- goto unacquire_priv_sbp;
+ goto unaquire_priv_sbp;
}
befs_debug(sb, "---> befs_fill_super()");
if (!(bh = sb_bread(sb, sb_block))) {
befs_error(sb, "unable to read superblock");
- goto unacquire_priv_sbp;
+ goto unaquire_priv_sbp;
}
/* account for offset of super block on x86 */
}
if (befs_load_sb(sb, disk_sb) != BEFS_OK)
- goto unacquire_bh;
+ goto unaquire_bh;
befs_dump_super_block(sb, disk_sb);
brelse(bh);
if (befs_check_sb(sb) != BEFS_OK)
- goto unacquire_priv_sbp;
+ goto unaquire_priv_sbp;
if( befs_sb->num_blocks > ~((sector_t)0) ) {
befs_error(sb, "blocks count: %Lu "
"is larger than the host can use",
befs_sb->num_blocks);
- goto unacquire_priv_sbp;
+ goto unaquire_priv_sbp;
}
/*
if (!sb->s_root) {
iput(root);
befs_error(sb, "get root inode failed");
- goto unacquire_priv_sbp;
+ goto unaquire_priv_sbp;
}
/* load nls library */
return 0;
/*****************/
- unacquire_bh:
+ unaquire_bh:
brelse(bh);
- unacquire_priv_sbp:
+ unaquire_priv_sbp:
kfree(sb->s_fs_info);
- unacquire_none:
+ unaquire_none:
sb->s_fs_info = NULL;
return -EINVAL;
}
}
static int
-befs_statfs(struct dentry *dentry, struct kstatfs *buf)
+befs_statfs(struct super_block *sb, struct kstatfs *buf)
{
- struct super_block *sb = dentry->d_sb;
befs_debug(sb, "---> befs_statfs()");
return 0;
}
-static int
+static struct super_block *
befs_get_sb(struct file_system_type *fs_type, int flags, const char *dev_name,
- void *data, struct vfsmount *mnt)
+ void *data)
{
- return get_sb_bdev(fs_type, flags, dev_name, data, befs_fill_super,
- mnt);
+ return get_sb_bdev(fs_type, flags, dev_name, data, befs_fill_super);
}
static struct file_system_type befs_fs_type = {
err = befs_init_inodecache();
if (err)
- goto unacquire_none;
+ goto unaquire_none;
err = register_filesystem(&befs_fs_type);
if (err)
- goto unacquire_inodecache;
+ goto unaquire_inodecache;
return 0;
-unacquire_inodecache:
+unaquire_inodecache:
befs_destroy_inodecache();
-unacquire_none:
+unaquire_none:
return err;
}