diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-09-29 14:59:30 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-09-29 22:02:20 -0400 |
commit | 7b9a2378b480f426d2c575633fa08c20e341bb7b (patch) | |
tree | 0a1304618b03248cba348daceebfa6b39576ae87 /fs/ocfs2 | |
parent | 49475555848d396a0c78fb2f8ecceb3f3f263ef1 (diff) |
ocfs2: needs ->d_lock to poke in ->d_parent->d_inode from ->d_revalidate()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ocfs2')
-rw-r--r-- | fs/ocfs2/dcache.c | 7 |
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) | |||
70 | */ | 70 | */ |
71 | if (inode == NULL) { | 71 | if (inode == NULL) { |
72 | unsigned long gen = (unsigned long) dentry->d_fsdata; | 72 | unsigned long gen = (unsigned long) dentry->d_fsdata; |
73 | unsigned long pgen = | 73 | unsigned long pgen; |
74 | OCFS2_I(dentry->d_parent->d_inode)->ip_dir_lock_gen; | 74 | spin_lock(&dentry->d_lock); |
75 | 75 | pgen = OCFS2_I(dentry->d_parent->d_inode)->ip_dir_lock_gen; | |
76 | spin_unlock(&dentry->d_lock); | ||
76 | trace_ocfs2_dentry_revalidate_negative(dentry->d_name.len, | 77 | trace_ocfs2_dentry_revalidate_negative(dentry->d_name.len, |
77 | dentry->d_name.name, | 78 | dentry->d_name.name, |
78 | pgen, gen); | 79 | pgen, gen); |