patch-2.1.43 linux/fs/ext2/ialloc.c

Next file: linux/fs/ext2/namei.c
Previous file: linux/fs/ext2/file.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.42/linux/fs/ext2/ialloc.c linux/fs/ext2/ialloc.c
@@ -171,9 +171,9 @@
 		printk ("ext2_free_inode: inode has no device\n");
 		return;
 	}
-	if (inode->i_count > 1) {
+	if (atomic_read(&inode->i_count) > 1) {
 		printk ("ext2_free_inode: inode has count=%d\n",
-			inode->i_count);
+			atomic_read(&inode->i_count));
 		return;
 	}
 	if (inode->i_nlink) {
@@ -404,7 +404,7 @@
 	sb->s_dirt = 1;
 	inode->i_mode = mode;
 	inode->i_sb = sb;
-	inode->i_count = 1;
+	atomic_set(&inode->i_count, 1);
 	inode->i_nlink = 1;
 	inode->i_dev = sb->s_dev;
 	inode->i_uid = current->fsuid;

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