From: Sougata Santra Date: Thu, 3 Apr 2014 21:50:34 +0000 (-0700) Subject: fs/hfsplus/extents.c: fix concurrent acess of alloc_blocks X-Git-Tag: v3.15-rc1~106^2~7 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d7bdb996aef67ea24c62707ca4e29b07025e9683;p=pandora-kernel.git fs/hfsplus/extents.c: fix concurrent acess of alloc_blocks Concurrent access to alloc_blocks in hfsplus_inode_info() is protected by extents_lock mutex. This patch fixes two instances where alloc_blocks modification was not protected with this lock. This fixes possible allocation bitmap corruption in race conditions while extending and truncating files. [akpm@linux-foundation.org: take extents_lock before taking a copy of ->alloc_blocks] [akpm@linux-foundation.org: remove now-unused label `out'] Signed-off-by: Sougata Santra Reviewed-by: Christoph Hellwig Cc: Vyacheslav Dubeyko Cc: Alexey Khoroshilov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed