original_kernel/fs/ext4
Eric Sandeen 7ce9d5d1f3 ext4: fix ext4_free_inode() vs. ext4_claim_inode() race
I was seeing fsck errors on inode bitmaps after a 4 thread
dbench run on a 4 cpu machine:

Inode bitmap differences: -50736 -(50752--50753) etc...

I believe that this is because ext4_free_inode() uses atomic
bitops, and although ext4_new_inode() *used* to also use atomic 
bitops for synchronization, commit 
393418676a changed this to use
the sb_bgl_lock, so that we could also synchronize against
read_inode_bitmap and initialization of uninit inode tables.

However, that change left ext4_free_inode using atomic bitops,
which I think leaves no synchronization between setting & 
unsetting bits in the inode table.

The below patch fixes it for me, although I wonder if we're 
getting at all heavy-handed with this spinlock...

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2009-03-04 18:38:18 -05:00
..
Kconfig
Makefile
acl.c
acl.h
balloc.c ext4: don't call jbd2_journal_force_commit_nested without journal 2009-02-26 00:57:35 -05:00
bitmap.c
dir.c
ext4.h ext4: Fix to read empty directory blocks correctly in 64k 2009-02-10 09:53:42 -05:00
ext4_extents.h
ext4_i.h
ext4_jbd2.c
ext4_jbd2.h
ext4_sb.h
extents.c
file.c
fsync.c
group.h
hash.c
ialloc.c ext4: fix ext4_free_inode() vs. ext4_claim_inode() race 2009-03-04 18:38:18 -05:00
inode.c ext4: don't call jbd2_journal_force_commit_nested without journal 2009-02-26 00:57:35 -05:00
ioctl.c
mballoc.c ext4: Initialize preallocation list_head's properly 2009-02-14 10:31:16 -05:00
mballoc.h
migrate.c ext4: Fix NULL dereference in ext4_ext_migrate()'s error handling 2009-02-15 20:02:19 -05:00
namei.c
namei.h
resize.c
super.c ext4: Remove duplicate call to ext4_commit_super() in ext4_freeze() 2009-02-28 00:08:53 -05:00
symlink.c
xattr.c
xattr.h
xattr_security.c
xattr_trusted.c
xattr_user.c