summaryrefslogtreecommitdiffstats
path: root/fs/coda/file.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-02-04 07:40:19 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-02-04 07:40:19 +0000
commit33263fc5f9ac8e8cb2b22d06af3ce5ac1dd815e4 (patch)
tree2d1b86a40bef0958a68cf1a2eafbeb0667a70543 /fs/coda/file.c
parent216f5f51aa02f8b113aa620ebc14a9631a217a00 (diff)
Merge with Linux 2.3.32.
Diffstat (limited to 'fs/coda/file.c')
-rw-r--r--fs/coda/file.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/fs/coda/file.c b/fs/coda/file.c
index d5cf1afef..d053258e8 100644
--- a/fs/coda/file.c
+++ b/fs/coda/file.c
@@ -26,7 +26,7 @@
#include <linux/coda_proc.h>
/* file operations */
-static int coda_readpage(struct file *file, struct page * page);
+static int coda_readpage(struct dentry *dentry, struct page * page);
static ssize_t coda_file_read(struct file *f, char *buf, size_t count, loff_t *off);
static ssize_t coda_file_write(struct file *f, const char *buf, size_t count, loff_t *off);
static int coda_file_mmap(struct file * file, struct vm_area_struct * vma);
@@ -50,10 +50,8 @@ struct inode_operations coda_file_inode_operations = {
NULL, /* get_block */
coda_readpage, /* readpage */
NULL, /* writepage */
- NULL, /* flushpage */
NULL, /* truncate */
coda_permission, /* permission */
- NULL, /* smap */
coda_revalidate_inode /* revalidate */
};
@@ -76,12 +74,10 @@ struct file_operations coda_file_operations = {
};
/* File file operations */
-static int coda_readpage(struct file * coda_file, struct page * page)
+static int coda_readpage(struct dentry * dentry, struct page * page)
{
- struct dentry *de = coda_file->f_dentry;
- struct inode *coda_inode = de->d_inode;
+ struct inode *coda_inode = dentry->d_inode;
struct dentry cont_dentry;
- struct file cont_file;
struct coda_inode_info *cii;
ENTRY;
@@ -91,17 +87,16 @@ static int coda_readpage(struct file * coda_file, struct page * page)
if ( ! cii->c_ovp ) {
printk("coda_readpage: no open inode for ino %ld, %s\n",
- coda_inode->i_ino, de->d_name.name);
+ coda_inode->i_ino, dentry->d_name.name);
return -ENXIO;
}
- coda_prepare_openfile(coda_inode, coda_file, cii->c_ovp,
- &cont_file, &cont_dentry);
+ cont_dentry.d_inode = cii->c_ovp;
CDEBUG(D_INODE, "coda ino: %ld, cached ino %ld, page offset: %lx\n",
coda_inode->i_ino, cii->c_ovp->i_ino, page->index);
- block_read_full_page(&cont_file, page);
+ block_read_full_page(&cont_dentry, page);
EXIT;
return 0;
}