]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
fat: mmu_private 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)
commit2bdf67eb1631f30e2f3f5d49e4007c76e88877a8
treed3d337e52516b3b61cdf4508cf445ef8dcaae2ed
parent0e75f5da06c05425f4b375eb981c4489fb2d9787
fat: mmu_private race fix

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

So, the access rule for mmu_private is we must hold ->i_mutex.  But,
fat_get_block() path doesn't follow the rule on non-allocation path.

This fixes by using i_size instead if non-allocation path.

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/cache.c
fs/fat/dir.c
fs/fat/fat.h
fs/fat/inode.c