patch-2.3.9 linux/net/core/scm.c

Next file: linux/net/decnet/dn_nsp_out.c
Previous file: linux/mm/swapfile.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.8/linux/net/core/scm.c linux/net/core/scm.c
@@ -232,7 +232,7 @@
 			break;
 		}
 		/* Bump the usage count and install the file. */
-		fp[i]->f_count++;
+		atomic_inc(&fp[i]->f_count);
 		current->files->fd[new_fd] = fp[i];
 	}
 
@@ -274,7 +274,7 @@
 		memcpy(new_fpl, fpl, sizeof(*fpl));
 
 		for (i=fpl->count-1; i>=0; i--)
-			fpl->fp[i]->f_count++;
+			atomic_inc(&fpl->fp[i]->f_count);
 	}
 	return new_fpl;
 }

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