Skip to content

Commit

Permalink
ocfs2: needs ->d_lock to poke in ->d_parent->d_inode from ->d_revalid…
Browse files Browse the repository at this point in the history
…ate()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Sep 30, 2013
1 parent 4947555 commit 7b9a237
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions fs/ocfs2/dcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 7b9a237

Please sign in to comment.