]> git.baikalelectronics.ru Git - kernel.git/commit
config fs: avoid switching ->d_op on live dentry
authorNick Piggin <npiggin@kernel.dk>
Fri, 7 Jan 2011 06:49:21 +0000 (17:49 +1100)
committerNick Piggin <npiggin@kernel.dk>
Fri, 7 Jan 2011 06:50:17 +0000 (17:50 +1100)
commit0f7202b147ec4a8e9e49da7272f7987d55236016
tree31cd59dd54966d225ae159f41308798b2d58b8a2
parent1bfed8ceb9b51f95aa97e8f0291b02707d2990d9
config fs: avoid switching ->d_op on live dentry

Switching d_op on a live dentry is racy in general, so avoid it. In this case
it is a negative dentry, which is safer, but there are still concurrent ops
which may be called on d_op in that case (eg. d_revalidate). So in general
a filesystem may not do this. Fix configfs so as not to do this.

Signed-off-by: Nick Piggin <npiggin@kernel.dk>
fs/configfs/dir.c