diff options
Diffstat (limited to 'fs/ocfs2/dcache.c')
-rw-r--r-- | fs/ocfs2/dcache.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/ocfs2/dcache.c b/fs/ocfs2/dcache.c index 4fda7a5f3088..290373024d9d 100644 --- a/fs/ocfs2/dcache.c +++ b/fs/ocfs2/dcache.c | |||
@@ -42,8 +42,8 @@ | |||
42 | void ocfs2_dentry_attach_gen(struct dentry *dentry) | 42 | void ocfs2_dentry_attach_gen(struct dentry *dentry) |
43 | { | 43 | { |
44 | unsigned long gen = | 44 | unsigned long gen = |
45 | OCFS2_I(dentry->d_parent->d_inode)->ip_dir_lock_gen; | 45 | OCFS2_I(d_inode(dentry->d_parent))->ip_dir_lock_gen; |
46 | BUG_ON(dentry->d_inode); | 46 | BUG_ON(d_inode(dentry)); |
47 | dentry->d_fsdata = (void *)gen; | 47 | dentry->d_fsdata = (void *)gen; |
48 | } | 48 | } |
49 | 49 | ||
@@ -57,7 +57,7 @@ static int ocfs2_dentry_revalidate(struct dentry *dentry, unsigned int flags) | |||
57 | if (flags & LOOKUP_RCU) | 57 | if (flags & LOOKUP_RCU) |
58 | return -ECHILD; | 58 | return -ECHILD; |
59 | 59 | ||
60 | inode = dentry->d_inode; | 60 | inode = d_inode(dentry); |
61 | osb = OCFS2_SB(dentry->d_sb); | 61 | osb = OCFS2_SB(dentry->d_sb); |
62 | 62 | ||
63 | trace_ocfs2_dentry_revalidate(dentry, dentry->d_name.len, | 63 | trace_ocfs2_dentry_revalidate(dentry, dentry->d_name.len, |
@@ -71,7 +71,7 @@ static int ocfs2_dentry_revalidate(struct dentry *dentry, unsigned int flags) | |||
71 | unsigned long gen = (unsigned long) dentry->d_fsdata; | 71 | unsigned long gen = (unsigned long) dentry->d_fsdata; |
72 | unsigned long pgen; | 72 | unsigned long pgen; |
73 | spin_lock(&dentry->d_lock); | 73 | spin_lock(&dentry->d_lock); |
74 | pgen = OCFS2_I(dentry->d_parent->d_inode)->ip_dir_lock_gen; | 74 | pgen = OCFS2_I(d_inode(dentry->d_parent))->ip_dir_lock_gen; |
75 | spin_unlock(&dentry->d_lock); | 75 | spin_unlock(&dentry->d_lock); |
76 | trace_ocfs2_dentry_revalidate_negative(dentry->d_name.len, | 76 | trace_ocfs2_dentry_revalidate_negative(dentry->d_name.len, |
77 | dentry->d_name.name, | 77 | dentry->d_name.name, |
@@ -146,7 +146,7 @@ static int ocfs2_match_dentry(struct dentry *dentry, | |||
146 | if (skip_unhashed && d_unhashed(dentry)) | 146 | if (skip_unhashed && d_unhashed(dentry)) |
147 | return 0; | 147 | return 0; |
148 | 148 | ||
149 | parent = dentry->d_parent->d_inode; | 149 | parent = d_inode(dentry->d_parent); |
150 | /* Negative parent dentry? */ | 150 | /* Negative parent dentry? */ |
151 | if (!parent) | 151 | if (!parent) |
152 | return 0; | 152 | return 0; |
@@ -243,7 +243,7 @@ int ocfs2_dentry_attach_lock(struct dentry *dentry, | |||
243 | if (!inode) | 243 | if (!inode) |
244 | return 0; | 244 | return 0; |
245 | 245 | ||
246 | if (!dentry->d_inode && dentry->d_fsdata) { | 246 | if (d_really_is_negative(dentry) && dentry->d_fsdata) { |
247 | /* Converting a negative dentry to positive | 247 | /* Converting a negative dentry to positive |
248 | Clear dentry->d_fsdata */ | 248 | Clear dentry->d_fsdata */ |
249 | dentry->d_fsdata = dl = NULL; | 249 | dentry->d_fsdata = dl = NULL; |
@@ -446,7 +446,7 @@ void ocfs2_dentry_move(struct dentry *dentry, struct dentry *target, | |||
446 | { | 446 | { |
447 | int ret; | 447 | int ret; |
448 | struct ocfs2_super *osb = OCFS2_SB(old_dir->i_sb); | 448 | struct ocfs2_super *osb = OCFS2_SB(old_dir->i_sb); |
449 | struct inode *inode = dentry->d_inode; | 449 | struct inode *inode = d_inode(dentry); |
450 | 450 | ||
451 | /* | 451 | /* |
452 | * Move within the same directory, so the actual lock info won't | 452 | * Move within the same directory, so the actual lock info won't |