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

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

diff -u --recursive --new-file v2.1.42/linux/fs/sysv/ialloc.c linux/fs/sysv/ialloc.c
@@ -62,8 +62,9 @@
 		printk("sysv_free_inode: inode has no device\n");
 		return;
 	}
-	if (inode->i_count != 1) {
-		printk("sysv_free_inode: inode has count=%d\n", inode->i_count);
+	if (atomic_read(&inode->i_count) != 1) {
+		printk("sysv_free_inode: inode has count=%d\n",
+		       atomic_read(&inode->i_count));
 		return;
 	}
 	if (inode->i_nlink) {
@@ -149,7 +150,7 @@
 	mark_buffer_dirty(sb->sv_bh1, 1); /* super-block has been modified */
 	if (sb->sv_bh1 != sb->sv_bh2) mark_buffer_dirty(sb->sv_bh2, 1);
 	sb->s_dirt = 1; /* and needs time stamp */
-	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