]> git.hungrycats.org Git - linux/commit
[PATCH] ext2 block allocation race fix
authorAndrew Morton <akpm@osdl.org>
Sun, 9 Nov 2003 23:18:01 +0000 (15:18 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Sun, 9 Nov 2003 23:18:01 +0000 (15:18 -0800)
commitfb823ed335807a9a4105bda185fd99976b332f7f
treee94333db7df5933b37c873e4a2027dcedf5e43ad
parent410257b5a8cf1857972141f4f1e56077ebb341a6
[PATCH] ext2 block allocation race fix

If this CPU decides that an ext2 block group has a free block it will then go
in and try to acquire it.  No locks are held, so another CPU can come in and
steal the last block.

In this case we will bogusly report a corrupted filessytem.

Fix it by just restarting the scan - this will choose a different blockgroup
or will generate -ENOSPC.
fs/ext2/balloc.c