diff options
author | Dave Jones <davej@redhat.com> | 2006-12-12 17:41:41 -0500 |
---|---|---|
committer | Dave Jones <davej@redhat.com> | 2006-12-12 17:41:41 -0500 |
commit | c4366889dda8110247be59ca41fddb82951a8c26 (patch) | |
tree | 705c1a996bed8fd48ce94ff33ec9fd00f9b94875 /fs/coda | |
parent | db2fb9db5735cc532fd4fc55e94b9a3c3750378e (diff) | |
parent | e1036502e5263851259d147771226161e5ccc85a (diff) |
Merge ../linus
Conflicts:
drivers/cpufreq/cpufreq.c
Diffstat (limited to 'fs/coda')
-rw-r--r-- | fs/coda/dir.c | 8 | ||||
-rw-r--r-- | fs/coda/file.c | 14 | ||||
-rw-r--r-- | fs/coda/inode.c | 8 |
3 files changed, 15 insertions, 15 deletions
diff --git a/fs/coda/dir.c b/fs/coda/dir.c index 0102b28a15..0c6f7f3b3d 100644 --- a/fs/coda/dir.c +++ b/fs/coda/dir.c | |||
@@ -441,7 +441,7 @@ static int coda_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
441 | /* file operations for directories */ | 441 | /* file operations for directories */ |
442 | int coda_readdir(struct file *coda_file, void *dirent, filldir_t filldir) | 442 | int coda_readdir(struct file *coda_file, void *dirent, filldir_t filldir) |
443 | { | 443 | { |
444 | struct dentry *coda_dentry = coda_file->f_dentry; | 444 | struct dentry *coda_dentry = coda_file->f_path.dentry; |
445 | struct coda_file_info *cfi; | 445 | struct coda_file_info *cfi; |
446 | struct file *host_file; | 446 | struct file *host_file; |
447 | struct inode *host_inode; | 447 | struct inode *host_inode; |
@@ -453,7 +453,7 @@ int coda_readdir(struct file *coda_file, void *dirent, filldir_t filldir) | |||
453 | 453 | ||
454 | coda_vfs_stat.readdir++; | 454 | coda_vfs_stat.readdir++; |
455 | 455 | ||
456 | host_inode = host_file->f_dentry->d_inode; | 456 | host_inode = host_file->f_path.dentry->d_inode; |
457 | mutex_lock(&host_inode->i_mutex); | 457 | mutex_lock(&host_inode->i_mutex); |
458 | host_file->f_pos = coda_file->f_pos; | 458 | host_file->f_pos = coda_file->f_pos; |
459 | 459 | ||
@@ -544,14 +544,14 @@ static int coda_venus_readdir(struct file *filp, filldir_t filldir, | |||
544 | /* catch truncated reads */ | 544 | /* catch truncated reads */ |
545 | if (ret < vdir_size || ret < vdir_size + vdir->d_namlen) { | 545 | if (ret < vdir_size || ret < vdir_size + vdir->d_namlen) { |
546 | printk("coda_venus_readdir: short read: %ld\n", | 546 | printk("coda_venus_readdir: short read: %ld\n", |
547 | filp->f_dentry->d_inode->i_ino); | 547 | filp->f_path.dentry->d_inode->i_ino); |
548 | ret = -EBADF; | 548 | ret = -EBADF; |
549 | break; | 549 | break; |
550 | } | 550 | } |
551 | /* validate whether the directory file actually makes sense */ | 551 | /* validate whether the directory file actually makes sense */ |
552 | if (vdir->d_reclen < vdir_size + vdir->d_namlen) { | 552 | if (vdir->d_reclen < vdir_size + vdir->d_namlen) { |
553 | printk("coda_venus_readdir: Invalid dir: %ld\n", | 553 | printk("coda_venus_readdir: Invalid dir: %ld\n", |
554 | filp->f_dentry->d_inode->i_ino); | 554 | filp->f_path.dentry->d_inode->i_ino); |
555 | ret = -EBADF; | 555 | ret = -EBADF; |
556 | break; | 556 | break; |
557 | } | 557 | } |
diff --git a/fs/coda/file.c b/fs/coda/file.c index dbfbcfa5b3..5ef2b609ec 100644 --- a/fs/coda/file.c +++ b/fs/coda/file.c | |||
@@ -66,7 +66,7 @@ coda_file_sendfile(struct file *coda_file, loff_t *ppos, size_t count, | |||
66 | static ssize_t | 66 | static ssize_t |
67 | coda_file_write(struct file *coda_file, const char __user *buf, size_t count, loff_t *ppos) | 67 | coda_file_write(struct file *coda_file, const char __user *buf, size_t count, loff_t *ppos) |
68 | { | 68 | { |
69 | struct inode *host_inode, *coda_inode = coda_file->f_dentry->d_inode; | 69 | struct inode *host_inode, *coda_inode = coda_file->f_path.dentry->d_inode; |
70 | struct coda_file_info *cfi; | 70 | struct coda_file_info *cfi; |
71 | struct file *host_file; | 71 | struct file *host_file; |
72 | ssize_t ret; | 72 | ssize_t ret; |
@@ -78,7 +78,7 @@ coda_file_write(struct file *coda_file, const char __user *buf, size_t count, lo | |||
78 | if (!host_file->f_op || !host_file->f_op->write) | 78 | if (!host_file->f_op || !host_file->f_op->write) |
79 | return -EINVAL; | 79 | return -EINVAL; |
80 | 80 | ||
81 | host_inode = host_file->f_dentry->d_inode; | 81 | host_inode = host_file->f_path.dentry->d_inode; |
82 | mutex_lock(&coda_inode->i_mutex); | 82 | mutex_lock(&coda_inode->i_mutex); |
83 | 83 | ||
84 | ret = host_file->f_op->write(host_file, buf, count, ppos); | 84 | ret = host_file->f_op->write(host_file, buf, count, ppos); |
@@ -106,8 +106,8 @@ coda_file_mmap(struct file *coda_file, struct vm_area_struct *vma) | |||
106 | if (!host_file->f_op || !host_file->f_op->mmap) | 106 | if (!host_file->f_op || !host_file->f_op->mmap) |
107 | return -ENODEV; | 107 | return -ENODEV; |
108 | 108 | ||
109 | coda_inode = coda_file->f_dentry->d_inode; | 109 | coda_inode = coda_file->f_path.dentry->d_inode; |
110 | host_inode = host_file->f_dentry->d_inode; | 110 | host_inode = host_file->f_path.dentry->d_inode; |
111 | coda_file->f_mapping = host_file->f_mapping; | 111 | coda_file->f_mapping = host_file->f_mapping; |
112 | if (coda_inode->i_mapping == &coda_inode->i_data) | 112 | if (coda_inode->i_mapping == &coda_inode->i_data) |
113 | coda_inode->i_mapping = host_inode->i_mapping; | 113 | coda_inode->i_mapping = host_inode->i_mapping; |
@@ -190,7 +190,7 @@ int coda_flush(struct file *coda_file, fl_owner_t id) | |||
190 | cfi = CODA_FTOC(coda_file); | 190 | cfi = CODA_FTOC(coda_file); |
191 | BUG_ON(!cfi || cfi->cfi_magic != CODA_MAGIC); | 191 | BUG_ON(!cfi || cfi->cfi_magic != CODA_MAGIC); |
192 | 192 | ||
193 | coda_inode = coda_file->f_dentry->d_inode; | 193 | coda_inode = coda_file->f_path.dentry->d_inode; |
194 | 194 | ||
195 | err = venus_store(coda_inode->i_sb, coda_i2f(coda_inode), coda_flags, | 195 | err = venus_store(coda_inode->i_sb, coda_i2f(coda_inode), coda_flags, |
196 | coda_file->f_uid); | 196 | coda_file->f_uid); |
@@ -233,7 +233,7 @@ int coda_release(struct inode *coda_inode, struct file *coda_file) | |||
233 | err = venus_close(coda_inode->i_sb, coda_i2f(coda_inode), | 233 | err = venus_close(coda_inode->i_sb, coda_i2f(coda_inode), |
234 | coda_flags, coda_file->f_uid); | 234 | coda_flags, coda_file->f_uid); |
235 | 235 | ||
236 | host_inode = cfi->cfi_container->f_dentry->d_inode; | 236 | host_inode = cfi->cfi_container->f_path.dentry->d_inode; |
237 | cii = ITOC(coda_inode); | 237 | cii = ITOC(coda_inode); |
238 | 238 | ||
239 | /* did we mmap this file? */ | 239 | /* did we mmap this file? */ |
@@ -270,7 +270,7 @@ int coda_fsync(struct file *coda_file, struct dentry *coda_dentry, int datasync) | |||
270 | coda_vfs_stat.fsync++; | 270 | coda_vfs_stat.fsync++; |
271 | 271 | ||
272 | if (host_file->f_op && host_file->f_op->fsync) { | 272 | if (host_file->f_op && host_file->f_op->fsync) { |
273 | host_dentry = host_file->f_dentry; | 273 | host_dentry = host_file->f_path.dentry; |
274 | host_inode = host_dentry->d_inode; | 274 | host_inode = host_dentry->d_inode; |
275 | mutex_lock(&host_inode->i_mutex); | 275 | mutex_lock(&host_inode->i_mutex); |
276 | err = host_file->f_op->fsync(host_file, host_dentry, datasync); | 276 | err = host_file->f_op->fsync(host_file, host_dentry, datasync); |
diff --git a/fs/coda/inode.c b/fs/coda/inode.c index 88d1233211..01395defed 100644 --- a/fs/coda/inode.c +++ b/fs/coda/inode.c | |||
@@ -38,12 +38,12 @@ static void coda_clear_inode(struct inode *); | |||
38 | static void coda_put_super(struct super_block *); | 38 | static void coda_put_super(struct super_block *); |
39 | static int coda_statfs(struct dentry *dentry, struct kstatfs *buf); | 39 | static int coda_statfs(struct dentry *dentry, struct kstatfs *buf); |
40 | 40 | ||
41 | static kmem_cache_t * coda_inode_cachep; | 41 | static struct kmem_cache * coda_inode_cachep; |
42 | 42 | ||
43 | static struct inode *coda_alloc_inode(struct super_block *sb) | 43 | static struct inode *coda_alloc_inode(struct super_block *sb) |
44 | { | 44 | { |
45 | struct coda_inode_info *ei; | 45 | struct coda_inode_info *ei; |
46 | ei = (struct coda_inode_info *)kmem_cache_alloc(coda_inode_cachep, SLAB_KERNEL); | 46 | ei = (struct coda_inode_info *)kmem_cache_alloc(coda_inode_cachep, GFP_KERNEL); |
47 | if (!ei) | 47 | if (!ei) |
48 | return NULL; | 48 | return NULL; |
49 | memset(&ei->c_fid, 0, sizeof(struct CodaFid)); | 49 | memset(&ei->c_fid, 0, sizeof(struct CodaFid)); |
@@ -58,7 +58,7 @@ static void coda_destroy_inode(struct inode *inode) | |||
58 | kmem_cache_free(coda_inode_cachep, ITOC(inode)); | 58 | kmem_cache_free(coda_inode_cachep, ITOC(inode)); |
59 | } | 59 | } |
60 | 60 | ||
61 | static void init_once(void * foo, kmem_cache_t * cachep, unsigned long flags) | 61 | static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flags) |
62 | { | 62 | { |
63 | struct coda_inode_info *ei = (struct coda_inode_info *) foo; | 63 | struct coda_inode_info *ei = (struct coda_inode_info *) foo; |
64 | 64 | ||
@@ -119,7 +119,7 @@ static int get_device_index(struct coda_mount_data *data) | |||
119 | file = fget(data->fd); | 119 | file = fget(data->fd); |
120 | inode = NULL; | 120 | inode = NULL; |
121 | if(file) | 121 | if(file) |
122 | inode = file->f_dentry->d_inode; | 122 | inode = file->f_path.dentry->d_inode; |
123 | 123 | ||
124 | if(!inode || !S_ISCHR(inode->i_mode) || | 124 | if(!inode || !S_ISCHR(inode->i_mode) || |
125 | imajor(inode) != CODA_PSDEV_MAJOR) { | 125 | imajor(inode) != CODA_PSDEV_MAJOR) { |