patch-2.1.79 linux/fs/coda/file.c

Next file: linux/fs/coda/inode.c
Previous file: linux/fs/coda/dir.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.78/linux/fs/coda/file.c linux/fs/coda/file.c
@@ -25,10 +25,10 @@
 #include <linux/coda_cache.h>
 
 /* file operations */
-static int coda_readpage(struct dentry *, struct page *);
-static ssize_t coda_file_read(struct file *, char *, size_t, loff_t *);
-static ssize_t coda_file_write(struct file *, const char *, size_t, loff_t *);
-static int coda_file_mmap(struct file *, struct vm_area_struct *);
+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);
 
 /* exported from this file */
 int coda_fsync(struct file *, struct dentry *dentry);
@@ -74,9 +74,11 @@
 };
 
 /*  File file operations */
-static int coda_readpage(struct dentry *dentry, struct page * page)
+static int coda_readpage(struct dentry *de, struct page * page)
 {
-        struct inode *open_inode, *inode = dentry->d_inode;
+	struct inode *inode = de->d_inode;
+	struct dentry cont_dentry;
+        struct inode *cont_inode;
         struct cnode *cnp;
 
         ENTRY;
@@ -89,12 +91,12 @@
                 return -ENXIO;
         }
 
-        open_inode = cnp->c_ovp;
+        cont_inode = cnp->c_ovp;
+	cont_dentry.d_inode = cont_inode;
 
-        CDEBUG(D_INODE, "coda ino: %ld, cached ino %ld, page offset: %lx\n", inode->i_ino, open_inode->i_ino, page->offset);
+        CDEBUG(D_INODE, "coda ino: %ld, cached ino %ld, page offset: %lx\n", inode->i_ino, cont_inode->i_ino, page->offset);
 
-	/* N.B. This needs the dentry for open_inode */
-        generic_readpage(open_inode, page);
+        generic_readpage(&cont_dentry, page);
         EXIT;
         return 0;
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov