patch-1.3.46 linux/fs/inode.c

Next file: linux/fs/isofs/inode.c
Previous file: linux/fs/hpfs/hpfs_fs.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.45/linux/fs/inode.c linux/fs/inode.c
@@ -149,6 +149,10 @@
 	struct wait_queue * wait;
 
 	wait_on_inode(inode);
+	if (IS_WRITABLE(inode)) {
+		if (inode->i_sb->dq_op)
+			inode->i_sb->dq_op->drop(inode);
+	}
 	remove_inode_hash(inode);
 	remove_inode_free(inode);
 	wait = ((volatile struct inode *) inode)->i_wait;
@@ -389,28 +393,38 @@
 		inode->i_count--;
 		return;
 	}
+
 	wake_up(&inode_wait);
 	if (inode->i_pipe) {
 		unsigned long page = (unsigned long) PIPE_BASE(*inode);
 		PIPE_BASE(*inode) = NULL;
 		free_page(page);
 	}
+
 	if (inode->i_sb && inode->i_sb->s_op && inode->i_sb->s_op->put_inode) {
 		inode->i_sb->s_op->put_inode(inode);
 		if (!inode->i_nlink)
 			return;
 	}
+
 	if (inode->i_dirt) {
 		write_inode(inode);	/* we can sleep - so do again */
 		wait_on_inode(inode);
 		goto repeat;
 	}
+
 	inode->i_count--;
+	if (IS_WRITABLE(inode)) {
+		if (inode->i_sb->dq_op)
+			inode->i_sb->dq_op->drop(inode);
+	}
+
 	if (inode->i_mmap) {
 		printk("iput: inode %lu on device %s still has mappings.\n",
 			inode->i_ino, kdevname(inode->i_dev));
 		inode->i_mmap = NULL;
 	}
+
 	nr_free_inodes++;
 	return;
 }
@@ -499,7 +513,7 @@
 	return inode;
 }
 
-struct inode * __iget(struct super_block * sb, int nr, int crossmntp)
+struct inode *__iget(struct super_block * sb, int nr, int crossmntp)
 {
 	static struct wait_queue * update_wait = NULL;
 	struct inode_hash_entry * h;
@@ -526,7 +540,6 @@
 	inode->i_sb = sb;
 	inode->i_dev = sb->s_dev;
 	inode->i_ino = nr;
-	inode->i_flags = sb->s_flags;
 	put_last_free(inode);
 	insert_inode_hash(inode);
 	read_inode(inode);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this