patch-2.3.9 linux/fs/minix/truncate.c

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

diff -u --recursive --new-file v2.3.8/linux/fs/minix/truncate.c linux/fs/minix/truncate.c
@@ -33,7 +33,7 @@
  */
 
 #define DATA_BUFFER_USED(bh) \
-	((bh->b_count > 1) || buffer_locked(bh))
+	(atomic_read(&bh->b_count) || buffer_locked(bh))
 
 /*
  * The functions for minix V1 fs truncation.
@@ -121,7 +121,7 @@
 		if (*(ind++))
 			break;
 	if (i >= 512) {
-		if (ind_bh->b_count != 1)
+		if (atomic_read(&ind_bh->b_count) != 1)
 			retry = 1;
 		else {
 			tmp = *p;
@@ -166,7 +166,7 @@
 		if (*(dind++))
 			break;
 	if (i >= 512) {
-		if (dind_bh->b_count != 1)
+		if (atomic_read(&dind_bh->b_count) != 1)
 			retry = 1;
 		else {
 			tmp = *p;
@@ -285,7 +285,7 @@
 		if (*(ind++))
 			break;
 	if (i >= 256) {
-		if (ind_bh->b_count != 1)
+		if (atomic_read(&ind_bh->b_count) != 1)
 			retry = 1;
 		else {
 			tmp = *p;
@@ -330,7 +330,7 @@
 		if (*(dind++))
 			break;
 	if (i >= 256) {
-		if (dind_bh->b_count != 1)
+		if (atomic_read(&dind_bh->b_count) != 1)
 			retry = 1;
 		else {
 			tmp = *p;
@@ -376,7 +376,7 @@
                 if (*(tind++))
                         break;
         if (i >= 256) {
-                if (tind_bh->b_count != 1)
+                if (atomic_read(&tind_bh->b_count) != 1)
                         retry = 1;
                 else {
                         tmp = *p;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)