diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1998-03-17 22:05:47 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1998-03-17 22:05:47 +0000 |
commit | 27cfca1ec98e91261b1a5355d10a8996464b63af (patch) | |
tree | 8e895a53e372fa682b4c0a585b9377d67ed70d0e /fs/inode.c | |
parent | 6a76fb7214c477ccf6582bd79c5b4ccc4f9c41b1 (diff) |
Look Ma' what I found on my harddisk ...
o New faster syscalls for 2.1.x, too
o Upgrade to 2.1.89.
Don't try to run this. It's flaky as hell. But feel free to debug ...
Diffstat (limited to 'fs/inode.c')
-rw-r--r-- | fs/inode.c | 38 |
1 files changed, 33 insertions, 5 deletions
diff --git a/fs/inode.c b/fs/inode.c index 88dd09ad7..10ee82c12 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -127,6 +127,7 @@ static inline void init_once(struct inode * inode) memset(inode, 0, sizeof(*inode)); init_waitqueue(&inode->i_wait); INIT_LIST_HEAD(&inode->i_hash); + INIT_LIST_HEAD(&inode->i_dentry); sema_init(&inode->i_sem, 1); } @@ -215,7 +216,7 @@ void write_inode_now(struct inode *inode) /* * This is called by the filesystem to tell us * that the inode is no longer useful. We just - * terminate it with extreme predjudice. + * terminate it with extreme prejudice. */ void clear_inode(struct inode *inode) { @@ -224,6 +225,8 @@ void clear_inode(struct inode *inode) wait_on_inode(inode); if (IS_WRITABLE(inode) && inode->i_sb && inode->i_sb->dq_op) inode->i_sb->dq_op->drop(inode); + if (inode->i_sb && inode->i_sb->s_op && inode->i_sb->s_op->clear_inode) + inode->i_sb->s_op->clear_inode(inode); inode->i_state = 0; } @@ -647,7 +650,17 @@ restock: void insert_inode_hash(struct inode *inode) { struct list_head *head = inode_hashtable + hash(inode->i_sb, inode->i_ino); + spin_lock(&inode_lock); list_add(&inode->i_hash, head); + spin_unlock(&inode_lock); +} + +void remove_inode_hash(struct inode *inode) +{ + spin_lock(&inode_lock); + list_del(&inode->i_hash); + INIT_LIST_HEAD(&inode->i_hash); + spin_unlock(&inode_lock); } void iput(struct inode *inode) @@ -688,16 +701,22 @@ void iput(struct inode *inode) list_add(&inode->i_list, inode_in_use.prev); } #ifdef INODE_PARANOIA +if (inode->i_flock) +printk(KERN_ERR "iput: inode %s/%ld still has locks!\n", +kdevname(inode->i_dev), inode->i_ino); +if (!list_empty(&inode->i_dentry)) +printk(KERN_ERR "iput: device %s inode %ld still has aliases!\n", +kdevname(inode->i_dev), inode->i_ino); if (inode->i_count) -printk("iput: device %s inode %ld count changed, count=%d\n", +printk(KERN_ERR "iput: device %s inode %ld count changed, count=%d\n", kdevname(inode->i_dev), inode->i_ino, inode->i_count); if (atomic_read(&inode->i_sem.count) != 1) -printk("iput: Aieee, semaphore in use device %s, count=%d\n", +printk(KERN_ERR "iput: Aieee, semaphore in use device %s, count=%d\n", kdevname(inode->i_dev), atomic_read(&inode->i_sem.count)); #endif } - if (inode->i_count > (1<<15)) { - printk("iput: device %s inode %ld count wrapped\n", + if (inode->i_count > (1<<31)) { + printk(KERN_ERR "iput: inode %s/%ld count wrapped\n", kdevname(inode->i_dev), inode->i_ino); } spin_unlock(&inode_lock); @@ -745,3 +764,12 @@ int fs_may_remount_ro(struct super_block *sb) } return 1; /* Tis' cool bro. */ } + +void update_atime (struct inode *inode) +{ + if ( IS_NOATIME (inode) ) return; + if ( IS_NODIRATIME (inode) && S_ISDIR (inode->i_mode) ) return; + if ( IS_RDONLY (inode) ) return; + inode->i_atime = CURRENT_TIME; + mark_inode_dirty (inode); +} /* End Function update_atime */ |