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
Revert to Fedora kernel-2.6.17-1.2187_FC5 patched with vs2.0.2.1; there are too many...
[linux-2.6.git]
/
fs
/
jffs
/
inode-v23.c
diff --git
a/fs/jffs/inode-v23.c
b/fs/jffs/inode-v23.c
index
61d63de
..
020cc09
100644
(file)
--- a/
fs/jffs/inode-v23.c
+++ b/
fs/jffs/inode-v23.c
@@
-59,7
+59,7
@@
static const struct file_operations jffs_file_operations;
static struct inode_operations jffs_file_inode_operations;
static const struct file_operations jffs_dir_operations;
static struct inode_operations jffs_dir_inode_operations;
static struct inode_operations jffs_file_inode_operations;
static const struct file_operations jffs_dir_operations;
static struct inode_operations jffs_dir_inode_operations;
-static
const
struct address_space_operations jffs_address_operations;
+static struct address_space_operations jffs_address_operations;
kmem_cache_t *node_cache = NULL;
kmem_cache_t *fm_cache = NULL;
kmem_cache_t *node_cache = NULL;
kmem_cache_t *fm_cache = NULL;
@@
-364,11
+364,12
@@
jffs_new_inode(const struct inode * dir, struct jffs_raw_inode *raw_inode,
inode->i_ctime.tv_nsec = 0;
inode->i_mtime.tv_nsec = 0;
inode->i_atime.tv_nsec = 0;
inode->i_ctime.tv_nsec = 0;
inode->i_mtime.tv_nsec = 0;
inode->i_atime.tv_nsec = 0;
+ inode->i_blksize = PAGE_SIZE;
inode->i_blocks = (inode->i_size + 511) >> 9;
f = jffs_find_file(c, raw_inode->ino);
inode->i_blocks = (inode->i_size + 511) >> 9;
f = jffs_find_file(c, raw_inode->ino);
- inode->
i_private
= (void *)f;
+ inode->
u.generic_ip
= (void *)f;
insert_inode_hash(inode);
return inode;
insert_inode_hash(inode);
return inode;
@@
-376,9
+377,9
@@
jffs_new_inode(const struct inode * dir, struct jffs_raw_inode *raw_inode,
/* Get statistics of the file system. */
static int
/* Get statistics of the file system. */
static int
-jffs_statfs(struct
dentry *dentry
, struct kstatfs *buf)
+jffs_statfs(struct
super_block *sb
, struct kstatfs *buf)
{
{
- struct jffs_control *c = (struct jffs_control *)
dentry->d_
sb->s_fs_info;
+ struct jffs_control *c = (struct jffs_control *) sb->s_fs_info;
struct jffs_fmcontrol *fmc;
lock_kernel();
struct jffs_fmcontrol *fmc;
lock_kernel();
@@
-441,7
+442,7
@@
jffs_rename(struct inode *old_dir, struct dentry *old_dentry,
});
result = -ENOTDIR;
});
result = -ENOTDIR;
- if (!(old_dir_f =
old_dir->i_private
)) {
+ if (!(old_dir_f =
(struct jffs_file *)old_dir->u.generic_ip
)) {
D(printk("jffs_rename(): Old dir invalid.\n"));
goto jffs_rename_end;
}
D(printk("jffs_rename(): Old dir invalid.\n"));
goto jffs_rename_end;
}
@@
-455,7
+456,7
@@
jffs_rename(struct inode *old_dir, struct dentry *old_dentry,
/* Find the new directory. */
result = -ENOTDIR;
/* Find the new directory. */
result = -ENOTDIR;
- if (!(new_dir_f =
new_dir->i_private
)) {
+ if (!(new_dir_f =
(struct jffs_file *)new_dir->u.generic_ip
)) {
D(printk("jffs_rename(): New dir invalid.\n"));
goto jffs_rename_end;
}
D(printk("jffs_rename(): New dir invalid.\n"));
goto jffs_rename_end;
}
@@
-592,7
+593,7
@@
jffs_readdir(struct file *filp, void *dirent, filldir_t filldir)
}
else {
ddino = ((struct jffs_file *)
}
else {
ddino = ((struct jffs_file *)
- inode->
i_private
)->pino;
+ inode->
u.generic_ip
)->pino;
}
D3(printk("jffs_readdir(): \"..\" %u\n", ddino));
if (filldir(dirent, "..", 2, filp->f_pos, ddino, DT_DIR) < 0) {
}
D3(printk("jffs_readdir(): \"..\" %u\n", ddino));
if (filldir(dirent, "..", 2, filp->f_pos, ddino, DT_DIR) < 0) {
@@
-603,7
+604,7
@@
jffs_readdir(struct file *filp, void *dirent, filldir_t filldir)
}
filp->f_pos++;
}
}
filp->f_pos++;
}
- f = ((struct jffs_file *)inode->
i_private
)->children;
+ f = ((struct jffs_file *)inode->
u.generic_ip
)->children;
j = 2;
while(f && (f->deleted || j++ < filp->f_pos )) {
j = 2;
while(f && (f->deleted || j++ < filp->f_pos )) {
@@
-667,7
+668,7
@@
jffs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd)
}
r = -EACCES;
}
r = -EACCES;
- if (!(d = (struct jffs_file *)dir->
i_private
)) {
+ if (!(d = (struct jffs_file *)dir->
u.generic_ip
)) {
D(printk("jffs_lookup(): No such inode! (%lu)\n",
dir->i_ino));
goto jffs_lookup_end;
D(printk("jffs_lookup(): No such inode! (%lu)\n",
dir->i_ino));
goto jffs_lookup_end;
@@
-738,7
+739,7
@@
jffs_do_readpage_nolock(struct file *file, struct page *page)
unsigned long read_len;
int result;
struct inode *inode = (struct inode*)page->mapping->host;
unsigned long read_len;
int result;
struct inode *inode = (struct inode*)page->mapping->host;
- struct jffs_file *f = (struct jffs_file *)inode->
i_private
;
+ struct jffs_file *f = (struct jffs_file *)inode->
u.generic_ip
;
struct jffs_control *c = (struct jffs_control *)inode->i_sb->s_fs_info;
int r;
loff_t offset;
struct jffs_control *c = (struct jffs_control *)inode->i_sb->s_fs_info;
int r;
loff_t offset;
@@
-827,7
+828,7
@@
jffs_mkdir(struct inode *dir, struct dentry *dentry, int mode)
});
lock_kernel();
});
lock_kernel();
- dir_f =
dir->i_private
;
+ dir_f =
(struct jffs_file *)dir->u.generic_ip
;
ASSERT(if (!dir_f) {
printk(KERN_ERR "jffs_mkdir(): No reference to a "
ASSERT(if (!dir_f) {
printk(KERN_ERR "jffs_mkdir(): No reference to a "
@@
-971,7
+972,7
@@
jffs_remove(struct inode *dir, struct dentry *dentry, int type)
kfree(_name);
});
kfree(_name);
});
- dir_f =
dir->i_private
;
+ dir_f =
(struct jffs_file *) dir->u.generic_ip
;
c = dir_f->c;
result = -ENOENT;
c = dir_f->c;
result = -ENOENT;
@@
-1081,7
+1082,7
@@
jffs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t rdev)
if (!old_valid_dev(rdev))
return -EINVAL;
lock_kernel();
if (!old_valid_dev(rdev))
return -EINVAL;
lock_kernel();
- dir_f =
dir->i_private
;
+ dir_f =
(struct jffs_file *)dir->u.generic_ip
;
c = dir_f->c;
D3(printk (KERN_NOTICE "mknod(): down biglock\n"));
c = dir_f->c;
D3(printk (KERN_NOTICE "mknod(): down biglock\n"));
@@
-1185,7
+1186,7
@@
jffs_symlink(struct inode *dir, struct dentry *dentry, const char *symname)
kfree(_symname);
});
kfree(_symname);
});
- dir_f =
dir->i_private
;
+ dir_f =
(struct jffs_file *)dir->u.generic_ip
;
ASSERT(if (!dir_f) {
printk(KERN_ERR "jffs_symlink(): No reference to a "
"jffs_file struct in inode.\n");
ASSERT(if (!dir_f) {
printk(KERN_ERR "jffs_symlink(): No reference to a "
"jffs_file struct in inode.\n");
@@
-1288,7
+1289,7
@@
jffs_create(struct inode *dir, struct dentry *dentry, int mode,
kfree(s);
});
kfree(s);
});
- dir_f =
dir->i_private
;
+ dir_f =
(struct jffs_file *)dir->u.generic_ip
;
ASSERT(if (!dir_f) {
printk(KERN_ERR "jffs_create(): No reference to a "
"jffs_file struct in inode.\n");
ASSERT(if (!dir_f) {
printk(KERN_ERR "jffs_create(): No reference to a "
"jffs_file struct in inode.\n");
@@
-1402,9
+1403,9
@@
jffs_file_write(struct file *filp, const char *buf, size_t count,
goto out_isem;
}
goto out_isem;
}
- if (!(f =
inode->i_private
)) {
- D(printk("jffs_file_write(): inode->
i_private
= 0x%p\n",
- inode->
i_private
));
+ if (!(f =
(struct jffs_file *)inode->u.generic_ip
)) {
+ D(printk("jffs_file_write(): inode->
u.generic_ip
= 0x%p\n",
+ inode->
u.generic_ip
));
goto out_isem;
}
goto out_isem;
}
@@
-1613,7
+1614,7
@@
jffs_ioctl(struct inode *inode, struct file *filp, unsigned int cmd,
} /* jffs_ioctl() */
} /* jffs_ioctl() */
-static
const
struct address_space_operations jffs_address_operations = {
+static struct address_space_operations jffs_address_operations = {
.readpage = jffs_readpage,
.prepare_write = jffs_prepare_write,
.commit_write = jffs_commit_write,
.readpage = jffs_readpage,
.prepare_write = jffs_prepare_write,
.commit_write = jffs_commit_write,
@@
-1692,7
+1693,7
@@
jffs_read_inode(struct inode *inode)
mutex_unlock(&c->fmc->biglock);
return;
}
mutex_unlock(&c->fmc->biglock);
return;
}
- inode->
i_private =
f;
+ inode->
u.generic_ip = (void *)
f;
inode->i_mode = f->mode;
inode->i_nlink = f->nlink;
inode->i_uid = f->uid;
inode->i_mode = f->mode;
inode->i_nlink = f->nlink;
inode->i_uid = f->uid;
@@
-1705,6
+1706,7
@@
jffs_read_inode(struct inode *inode)
inode->i_mtime.tv_nsec =
inode->i_ctime.tv_nsec = 0;
inode->i_mtime.tv_nsec =
inode->i_ctime.tv_nsec = 0;
+ inode->i_blksize = PAGE_SIZE;
inode->i_blocks = (inode->i_size + 511) >> 9;
if (S_ISREG(inode->i_mode)) {
inode->i_op = &jffs_file_inode_operations;
inode->i_blocks = (inode->i_size + 511) >> 9;
if (S_ISREG(inode->i_mode)) {
inode->i_op = &jffs_file_inode_operations;
@@
-1746,7
+1748,7
@@
jffs_delete_inode(struct inode *inode)
lock_kernel();
inode->i_size = 0;
inode->i_blocks = 0;
lock_kernel();
inode->i_size = 0;
inode->i_blocks = 0;
- inode->
i_private
= NULL;
+ inode->
u.generic_ip
= NULL;
clear_inode(inode);
if (inode->i_nlink == 0) {
c = (struct jffs_control *) inode->i_sb->s_fs_info;
clear_inode(inode);
if (inode->i_nlink == 0) {
c = (struct jffs_control *) inode->i_sb->s_fs_info;
@@
-1783,11
+1785,10
@@
static struct super_operations jffs_ops =
.remount_fs = jffs_remount,
};
.remount_fs = jffs_remount,
};
-static
int
jffs_get_sb(struct file_system_type *fs_type,
- int flags, const char *dev_name, void *data
, struct vfsmount *mnt
)
+static
struct super_block *
jffs_get_sb(struct file_system_type *fs_type,
+ int flags, const char *dev_name, void *data)
{
{
- return get_sb_bdev(fs_type, flags, dev_name, data, jffs_fill_super,
- mnt);
+ return get_sb_bdev(fs_type, flags, dev_name, data, jffs_fill_super);
}
static struct file_system_type jffs_fs_type = {
}
static struct file_system_type jffs_fs_type = {