]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
fat: ->i_pos race fix
authorOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Thu, 6 Nov 2008 20:53:57 +0000 (12:53 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 6 Nov 2008 23:41:21 +0000 (15:41 -0800)
commit9ca59f4c3d28df14a1545a1e2832f34a0a50e3ed
tree4a9d307e2a3541765cf194f27d873c6d06e5d960
parent2bdf67eb1631f30e2f3f5d49e4007c76e88877a8
fat: ->i_pos race fix

i_pos is 64bits value, hence it's not atomic to update.

Important place is fat_write_inode() only, other places without lock
are just for printk().

This adds lock for "BITS_PER_LONG == 32" kernel.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/fat/inode.c