projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4947555
)
ocfs2: needs ->d_lock to poke in ->d_parent->d_inode from ->d_revalidate()
author
Al Viro
<viro@zeniv.linux.org.uk>
Sun, 29 Sep 2013 18:59:30 +0000
(14:59 -0400)
committer
Al Viro
<viro@zeniv.linux.org.uk>
Mon, 30 Sep 2013 02:02:20 +0000
(22:02 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/ocfs2/dcache.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/ocfs2/dcache.c
b/fs/ocfs2/dcache.c
index ef999729e274ead1ed88c699ee86b8011fd5ff77..0d3a97d2d5f659caeb60f20f448ce25371036ff2 100644
(file)
--- 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);