eCryptfs: Fix new inode race condition
authorTyler Hicks <tyhicks@linux.vnet.ibm.com>
Tue, 24 May 2011 08:49:02 +0000 (03:49 -0500)
committerTyler Hicks <tyhicks@linux.vnet.ibm.com>
Sun, 29 May 2011 19:23:39 +0000 (14:23 -0500)
commit3b06b3ebf44170c90c893c6c80916db6e922b9f2
tree1da70b311ad7ec7615f3d44ae269ca56a458fc2d
parent5ccf92037c7c6e6f28175fd245284923f939259f
eCryptfs: Fix new inode race condition

Only unlock and d_add() new inodes after the plaintext inode size has
been read from the lower filesystem. This fixes a race condition that
was sometimes seen during a multi-job kernel build in an eCryptfs mount.

https://bugzilla.kernel.org/show_bug.cgi?id=36002

Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
Reported-by: David <david@unsolicited.net>
Tested-by: David <david@unsolicited.net>
fs/ecryptfs/crypto.c
fs/ecryptfs/ecryptfs_kernel.h
fs/ecryptfs/file.c
fs/ecryptfs/inode.c
fs/ecryptfs/main.c