summaryrefslogtreecommitdiffstats
path: root/fs/coda
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1998-09-19 19:15:08 +0000
committerRalf Baechle <ralf@linux-mips.org>1998-09-19 19:15:08 +0000
commit03ba4131783cc9e872f8bb26a03f15bc11f27564 (patch)
tree88db8dba75ae06ba3bad08e42c5e52efc162535c /fs/coda
parent257730f99381dd26e10b832fce4c94cae7ac1176 (diff)
- Merge with Linux 2.1.121.
- Bugfixes.
Diffstat (limited to 'fs/coda')
-rw-r--r--fs/coda/cnode.c23
-rw-r--r--fs/coda/dir.c1
-rw-r--r--fs/coda/file.c1
-rw-r--r--fs/coda/pioctl.c1
-rw-r--r--fs/coda/psdev.c15
-rw-r--r--fs/coda/upcall.c26
6 files changed, 36 insertions, 31 deletions
diff --git a/fs/coda/cnode.c b/fs/coda/cnode.c
index 2f0f86878..4da714208 100644
--- a/fs/coda/cnode.c
+++ b/fs/coda/cnode.c
@@ -14,7 +14,6 @@ extern int coda_debug;
extern int coda_print_entry;
/* cnode.c */
-
static void coda_fill_inode(struct inode *inode, struct coda_vattr *attr)
{
CDEBUG(D_SUPER, "ino: %ld\n", inode->i_ino);
@@ -117,7 +116,6 @@ int coda_cnode_make(struct inode **inode, ViceFid *fid, struct super_block *sb)
return 0;
}
-
inline int coda_fideq(ViceFid *fid1, ViceFid *fid2)
{
int eq;
@@ -127,6 +125,27 @@ inline int coda_fideq(ViceFid *fid1, ViceFid *fid2)
return eq;
}
+void coda_replace_fid(struct inode *inode, struct ViceFid *oldfid,
+ struct ViceFid *newfid)
+{
+ struct coda_inode_info *cnp;
+ struct coda_sb_info *sbi= coda_sbp(inode->i_sb);
+
+ cnp = ITOC(inode);
+
+ if ( ! coda_fideq(&cnp->c_fid, oldfid) )
+ printk("What? oldfid != cnp->c_fid. Call 911.\n");
+
+ cnp->c_fid = *newfid;
+
+ list_del(&cnp->c_volrootlist);
+ if ( !coda_fid_is_weird(newfid) )
+ list_add(&cnp->c_volrootlist, &sbi->sbi_volroothead);
+
+ return;
+}
+
+
/* convert a fid to an inode. Mostly we can compute
diff --git a/fs/coda/dir.c b/fs/coda/dir.c
index fabc4e3c8..e074ca346 100644
--- a/fs/coda/dir.c
+++ b/fs/coda/dir.c
@@ -96,6 +96,7 @@ struct file_operations coda_dir_operations = {
NULL, /* ioctl */
NULL, /* mmap */
coda_open, /* open */
+ NULL,
coda_release, /* release */
coda_fsync, /* fsync */
NULL,
diff --git a/fs/coda/file.c b/fs/coda/file.c
index 949d9ce00..cbc81542f 100644
--- a/fs/coda/file.c
+++ b/fs/coda/file.c
@@ -66,6 +66,7 @@ struct file_operations coda_file_operations = {
NULL, /* ioctl */
coda_file_mmap, /* mmap */
coda_open, /* open */
+ NULL,
coda_release, /* release */
coda_fsync, /* fsync */
NULL, /* fasync */
diff --git a/fs/coda/pioctl.c b/fs/coda/pioctl.c
index aa143afcf..4a98361aa 100644
--- a/fs/coda/pioctl.c
+++ b/fs/coda/pioctl.c
@@ -65,6 +65,7 @@ struct file_operations coda_ioctl_operations = {
coda_pioctl, /* ioctl */
NULL, /* mmap */
coda_ioctl_open, /* open */
+ NULL,
coda_ioctl_release, /* release */
NULL, /* fsync */
};
diff --git a/fs/coda/psdev.c b/fs/coda/psdev.c
index 73fa6ddfe..144162f5a 100644
--- a/fs/coda/psdev.c
+++ b/fs/coda/psdev.c
@@ -47,13 +47,7 @@
#include <linux/coda_cache.h>
#include <linux/coda_proc.h>
-
-/*
- * Where is the prototype?
- */
-
-int proc_register_dynamic(struct proc_dir_entry * dir,
- struct proc_dir_entry * dp);
+extern struct proc_dir_entry proc_sys_root;
/*
* Coda stuff
@@ -391,6 +385,7 @@ static struct file_operations coda_psdev_fops = {
NULL, /* ioctl */
NULL, /* coda_psdev_mmap */
coda_psdev_open, /* open */
+ NULL,
coda_psdev_release, /* release */
NULL, /* fsync */
NULL, /* fasync */
@@ -402,7 +397,6 @@ static struct file_operations coda_psdev_fops = {
#ifdef CONFIG_PROC_FS
-extern struct proc_dir_entry proc_sys_root;
struct proc_dir_entry proc_sys_coda = {
0, 4, "coda",
@@ -489,6 +483,7 @@ struct proc_dir_entry proc_coda_cache_inv_control = {
#endif
+
__initfunc(int init_coda(void))
{
int status;
@@ -546,14 +541,12 @@ int init_coda_psdev(void)
#ifdef MODULE
-EXPORT_NO_SYMBOLS;
-
MODULE_AUTHOR("Peter J. Braam <braam@cs.cmu.edu>");
int init_module(void)
{
int status;
- printk(KERN_INFO "Coda Kernel/Venus communications (module), v4.6.0, braam@cs.cmu.edu\n");
+ printk(KERN_INFO "Coda Kernel/Venus communications (module), v4.7.1, braam@cs.cmu.edu.\n");
status = init_coda_psdev();
if ( status ) {
diff --git a/fs/coda/upcall.c b/fs/coda/upcall.c
index 041845e33..dadf27c7e 100644
--- a/fs/coda/upcall.c
+++ b/fs/coda/upcall.c
@@ -39,8 +39,6 @@
#include <linux/coda_cache.h>
#include <linux/coda_proc.h>
-extern void coda_purge_dentries(struct inode *inode);
-extern void coda_purge_children(struct inode *inode);
static int coda_upcall(struct coda_sb_info *mntinfo, int inSize, int *outSize,
union inputArgs *buffer);
@@ -537,16 +535,12 @@ int venus_pioctl(struct super_block *sb, struct ViceFid *fid,
inp->cfs_ioctl.data = (char *)(INSIZE(ioctl));
/* get the data out of user space */
-#ifdef L20
- memcpy_fromfs((char*)inp + (int)inp->cfs_ioctl.data,
- data->vi.in, data->vi.in_size);
-#else
if ( copy_from_user((char*)inp + (int)inp->cfs_ioctl.data,
data->vi.in, data->vi.in_size) ) {
error = EINVAL;
goto exit;
}
-#endif
+
error = coda_upcall(coda_sbp(sb), insize, &outsize, inp);
if (error) {
@@ -565,18 +559,13 @@ int venus_pioctl(struct super_block *sb, struct ViceFid *fid,
error = verify_area(VERIFY_WRITE, data->vi.out,
data->vi.out_size);
if ( error ) goto exit;
-#ifdef L20
- memcpy_tofs(data->vi.out,
- (char *)outp + (int)outp->cfs_ioctl.data,
- data->vi.out_size);
-#else
+
if (copy_to_user(data->vi.out,
(char *)outp + (int)outp->cfs_ioctl.data,
data->vi.out_size)) {
error = EINVAL;
goto exit;
}
-#endif
}
exit:
@@ -891,18 +880,19 @@ int coda_downcall(int opcode, union outputArgs * out, struct super_block *sb)
case CFS_REPLACE : {
struct inode *inode;
- ViceFid *fid = &out->cfs_replace.OldFid;
+ ViceFid *oldfid = &out->cfs_replace.OldFid;
+ ViceFid *newfid = &out->cfs_replace.NewFid;
clstats(CFS_REPLACE);
CDEBUG(D_DOWNCALL, "CFS_REPLACE\n");
- inode = coda_fid_to_inode(fid, sb);
+ inode = coda_fid_to_inode(oldfid, sb);
if ( inode ) {
CDEBUG(D_DOWNCALL, "replacefid: inode = %ld\n", inode->i_ino);
- coda_purge_children(inode);
- coda_purge_dentries(inode);
+ coda_replace_fid(inode, oldfid, newfid);
}else
CDEBUG(D_DOWNCALL, "purgefid: no inode\n");
+
return 0;
- }
+ }
}
return 0;
}