From: Miklos Szeredi Date: Thu, 20 Nov 2014 15:39:59 +0000 (+0100) Subject: ovl: fix remove/copy-up race X-Git-Tag: omap-for-v3.19/fixes-for-merge-window~82^2^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a105d685a8483985a01776411de191a726b48132;p=pandora-kernel.git ovl: fix remove/copy-up race ovl_remove_and_whiteout() needs to check if upper dentry exists or not after having locked upper parent directory. Previously we used a "type" value computed before locking the upper parent directory, which is susceptible to racing with copy-up. There's a similar check in ovl_check_empty_and_clear(). This one is not actually racy, since copy-up doesn't change the "emptyness" property of a directory. Add a comment to this effect, and check the existence of upper dentry locally to make the code cleaner. Signed-off-by: Miklos Szeredi --- Reading git-diff-tree failed