summaryrefslogtreecommitdiff
path: root/fs/ocfs2/dcache.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-19 13:05:38 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-19 13:05:38 -0700
commita7204d72db251784808b0c050220992d7f833a2c (patch)
tree3491452ea74b039f3278fd95bb7ad7c88b6b3631 /fs/ocfs2/dcache.c
parentba6857b2d49646f2d4c245ff58d95d145f380177 (diff)
parent31d141e3a666269a3b6fcccddb0351caf7454240 (diff)
Merge 3.12-rc6 into driver-core-next
We want these fixes here too. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/ocfs2/dcache.c')
-rw-r--r--fs/ocfs2/dcache.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/ocfs2/dcache.c b/fs/ocfs2/dcache.c
index ef999729e274..0d3a97d2d5f6 100644
--- a/fs/ocfs2/dcache.c
+++ b/fs/ocfs2/dcache.c
@@ -70,9 +70,10 @@ static int ocfs2_dentry_revalidate(struct dentry *dentry, unsigned int flags)
*/
if (inode == NULL) {
unsigned long gen = (unsigned long) dentry->d_fsdata;
- unsigned long pgen =
- OCFS2_I(dentry->d_parent->d_inode)->ip_dir_lock_gen;
-
+ unsigned long pgen;
+ spin_lock(&dentry->d_lock);
+ pgen = OCFS2_I(dentry->d_parent->d_inode)->ip_dir_lock_gen;
+ spin_unlock(&dentry->d_lock);
trace_ocfs2_dentry_revalidate_negative(dentry->d_name.len,
dentry->d_name.name,
pgen, gen);