From: Fabian Frederick Date: Tue, 17 Feb 2015 21:45:31 +0000 (-0800) Subject: fs/ufs/super.c: fix potential race condition X-Git-Tag: fixes-v4.0-rc1~78^2~54 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ed3ad79f87f31beed64778af0b29aff3074f700e;p=pandora-kernel.git fs/ufs/super.c: fix potential race condition Let locking subsystem decide on mutex management. As reported by Andrew Morton this patch fixes a bug: : lock_ufs() is assuming that on non-preempt uniprocessor, the calling : code will run atomically up to the matching unlock_ufs(). : : But that isn't true. The very first site I looked at (ufs_frag_map) : does sb_bread() under lock_ufs(). And sb_bread() will call schedule(), : very commonly. : : The ->mutex_owner stuff is a bit hacky but should work OK. Signed-off-by: Fabian Frederick Cc: Evgeniy Dushistov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed