git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
fs
/
adfs
/
super.c
diff --git
a/fs/adfs/super.c
b/fs/adfs/super.c
index
2439632
..
5023351
100644
(file)
--- a/
fs/adfs/super.c
+++ b/
fs/adfs/super.c
@@
-36,7
+36,7
@@
void __adfs_error(struct super_block *sb, const char *function, const char *fmt,
va_list args;
va_start(args, fmt);
va_list args;
va_start(args, fmt);
- vs
printf(error_buf
, fmt, args);
+ vs
nprintf(error_buf, sizeof(error_buf)
, fmt, args);
va_end(args);
printk(KERN_CRIT "ADFS-fs error (device %s)%s%s: %s\n",
va_end(args);
printk(KERN_CRIT "ADFS-fs error (device %s)%s%s: %s\n",
@@
-196,28
+196,28
@@
static int adfs_remount(struct super_block *sb, int *flags, char *data)
return parse_options(sb, data);
}
return parse_options(sb, data);
}
-static int adfs_statfs(struct
super_block *sb
, struct kstatfs *buf)
+static int adfs_statfs(struct
dentry *dentry
, struct kstatfs *buf)
{
{
- struct adfs_sb_info *asb = ADFS_SB(sb);
+ struct adfs_sb_info *asb = ADFS_SB(
dentry->d_
sb);
buf->f_type = ADFS_SUPER_MAGIC;
buf->f_namelen = asb->s_namelen;
buf->f_type = ADFS_SUPER_MAGIC;
buf->f_namelen = asb->s_namelen;
- buf->f_bsize = sb->s_blocksize;
+ buf->f_bsize =
dentry->d_
sb->s_blocksize;
buf->f_blocks = asb->s_size;
buf->f_files = asb->s_ids_per_zone * asb->s_map_size;
buf->f_bavail =
buf->f_blocks = asb->s_size;
buf->f_files = asb->s_ids_per_zone * asb->s_map_size;
buf->f_bavail =
- buf->f_bfree = adfs_map_free(sb);
+ buf->f_bfree = adfs_map_free(
dentry->d_
sb);
buf->f_ffree = (long)(buf->f_bfree * buf->f_files) / (long)buf->f_blocks;
return 0;
}
buf->f_ffree = (long)(buf->f_bfree * buf->f_files) / (long)buf->f_blocks;
return 0;
}
-static
kmem_cache_t
*adfs_inode_cachep;
+static
struct kmem_cache
*adfs_inode_cachep;
static struct inode *adfs_alloc_inode(struct super_block *sb)
{
struct adfs_inode_info *ei;
static struct inode *adfs_alloc_inode(struct super_block *sb)
{
struct adfs_inode_info *ei;
- ei = (struct adfs_inode_info *)kmem_cache_alloc(adfs_inode_cachep,
SLAB
_KERNEL);
+ ei = (struct adfs_inode_info *)kmem_cache_alloc(adfs_inode_cachep,
GFP
_KERNEL);
if (!ei)
return NULL;
return &ei->vfs_inode;
if (!ei)
return NULL;
return &ei->vfs_inode;
@@
-228,7
+228,7
@@
static void adfs_destroy_inode(struct inode *inode)
kmem_cache_free(adfs_inode_cachep, ADFS_I(inode));
}
kmem_cache_free(adfs_inode_cachep, ADFS_I(inode));
}
-static void init_once(void * foo,
kmem_cache_t
* cachep, unsigned long flags)
+static void init_once(void * foo,
struct kmem_cache
* cachep, unsigned long flags)
{
struct adfs_inode_info *ei = (struct adfs_inode_info *) foo;
{
struct adfs_inode_info *ei = (struct adfs_inode_info *) foo;
@@
-241,7
+241,8
@@
static int init_inodecache(void)
{
adfs_inode_cachep = kmem_cache_create("adfs_inode_cache",
sizeof(struct adfs_inode_info),
{
adfs_inode_cachep = kmem_cache_create("adfs_inode_cache",
sizeof(struct adfs_inode_info),
- 0, SLAB_RECLAIM_ACCOUNT,
+ 0, (SLAB_RECLAIM_ACCOUNT|
+ SLAB_MEM_SPREAD),
init_once, NULL);
if (adfs_inode_cachep == NULL)
return -ENOMEM;
init_once, NULL);
if (adfs_inode_cachep == NULL)
return -ENOMEM;
@@
-250,8
+251,7
@@
static int init_inodecache(void)
static void destroy_inodecache(void)
{
static void destroy_inodecache(void)
{
- if (kmem_cache_destroy(adfs_inode_cachep))
- printk(KERN_INFO "adfs_inode_cache: not all structures were freed\n");
+ kmem_cache_destroy(adfs_inode_cachep);
}
static struct super_operations adfs_sops = {
}
static struct super_operations adfs_sops = {
@@
-307,7
+307,7
@@
static struct adfs_discmap *adfs_read_map(struct super_block *sb, struct adfs_di
if (adfs_checkmap(sb, dm))
return dm;
if (adfs_checkmap(sb, dm))
return dm;
- adfs_error(sb,
NULL,
"map corrupted");
+ adfs_error(sb, "map corrupted");
error_free:
while (--zone >= 0)
error_free:
while (--zone >= 0)
@@
-338,11
+338,10
@@
static int adfs_fill_super(struct super_block *sb, void *data, int silent)
sb->s_flags |= MS_NODIRATIME;
sb->s_flags |= MS_NODIRATIME;
- asb = k
m
alloc(sizeof(*asb), GFP_KERNEL);
+ asb = k
z
alloc(sizeof(*asb), GFP_KERNEL);
if (!asb)
return -ENOMEM;
sb->s_fs_info = asb;
if (!asb)
return -ENOMEM;
sb->s_fs_info = asb;
- memset(asb, 0, sizeof(*asb));
/* set default options */
asb->s_uid = 0;
/* set default options */
asb->s_uid = 0;
@@
-469,10
+468,11
@@
error:
return -EINVAL;
}
return -EINVAL;
}
-static
struct super_block *
adfs_get_sb(struct file_system_type *fs_type,
- int flags, const char *dev_name, void *data)
+static
int
adfs_get_sb(struct file_system_type *fs_type,
+ int flags, const char *dev_name, void *data
, struct vfsmount *mnt
)
{
{
- return get_sb_bdev(fs_type, flags, dev_name, data, adfs_fill_super);
+ return get_sb_bdev(fs_type, flags, dev_name, data, adfs_fill_super,
+ mnt);
}
static struct file_system_type adfs_fs_type = {
}
static struct file_system_type adfs_fs_type = {