patch-2.4.19 linux-2.4.19/fs/coda/inode.c
Next file: linux-2.4.19/fs/coda/pioctl.c
Previous file: linux-2.4.19/fs/coda/file.c
Back to the patch index
Back to the overall index
- Lines: 83
- Date:
Fri Aug 2 17:39:45 2002
- Orig file:
linux-2.4.18/fs/coda/inode.c
- Orig date:
Mon Feb 25 11:38:08 2002
diff -urN linux-2.4.18/fs/coda/inode.c linux-2.4.19/fs/coda/inode.c
@@ -25,7 +25,6 @@
#include <linux/fs.h>
#include <linux/vmalloc.h>
-#include <asm/segment.h>
#include <linux/coda.h>
#include <linux/coda_linux.h>
@@ -129,6 +128,7 @@
sbi->sbi_sb = sb;
sbi->sbi_vcomm = vc;
INIT_LIST_HEAD(&sbi->sbi_cihead);
+ init_MUTEX(&sbi->sbi_iget4_mutex);
sb->u.generic_sbp = sbi;
sb->s_blocksize = 1024; /* XXXXX what do we put here?? */
@@ -189,28 +189,13 @@
if (!sbi) BUG();
-#if 0
- /* check if the inode is already initialized */
- if (inode->u.generic_ip) {
- printk("coda_read_inode: initialized inode");
- return;
- }
-
- inode->u.generic_ip = cii_alloc();
- if (!inode->u.generic_ip) {
- CDEBUG(D_CNODE, "coda_read_inode: failed to allocate inode info\n");
- make_bad_inode(inode);
- return;
- }
- memset(inode->u.generic_ip, 0, sizeof(struct coda_inode_info));
-#endif
-
cii = ITOC(inode);
if (!coda_isnullfid(&cii->c_fid)) {
printk("coda_read_inode: initialized inode");
return;
}
+ cii->c_mapcount = 0;
list_add(&cii->c_cilist, &sbi->sbi_cihead);
}
@@ -222,30 +207,21 @@
inode->i_ino, atomic_read(&inode->i_count));
CDEBUG(D_DOWNCALL, "clearing inode: %ld, %x\n", inode->i_ino, cii->c_flags);
- if (cii->c_container) BUG();
-
list_del_init(&cii->c_cilist);
- inode->i_mapping = &inode->i_data;
coda_cache_clear_inode(inode);
-
-#if 0
- cii_free(inode->u.generic_ip);
- inode->u.generic_ip = NULL;
-#endif
}
int coda_notify_change(struct dentry *de, struct iattr *iattr)
{
struct inode *inode = de->d_inode;
- struct coda_vattr vattr;
- int error;
-
- inode->i_ctime = CURRENT_TIME;
+ struct coda_vattr vattr;
+ int error;
- memset(&vattr, 0, sizeof(vattr));
- coda_iattr_to_vattr(iattr, &vattr);
+ memset(&vattr, 0, sizeof(vattr));
- vattr.va_type = C_VNON; /* cannot set type */
+ inode->i_ctime = CURRENT_TIME;
+ coda_iattr_to_vattr(iattr, &vattr);
+ vattr.va_type = C_VNON; /* cannot set type */
CDEBUG(D_SUPER, "vattr.va_mode %o\n", vattr.va_mode);
/* Venus is responsible for truncating the container-file!!! */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)