aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ocfs2')
-rw-r--r--fs/ocfs2/dcache.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/ocfs2/dcache.c b/fs/ocfs2/dcache.c
index 895532ac4d98..35e5f5a9ef59 100644
--- a/fs/ocfs2/dcache.c
+++ b/fs/ocfs2/dcache.c
@@ -174,13 +174,16 @@ struct dentry *ocfs2_find_local_alias(struct inode *inode,
174 list_for_each(p, &inode->i_dentry) { 174 list_for_each(p, &inode->i_dentry) {
175 dentry = list_entry(p, struct dentry, d_alias); 175 dentry = list_entry(p, struct dentry, d_alias);
176 176
177 spin_lock(&dentry->d_lock);
177 if (ocfs2_match_dentry(dentry, parent_blkno, skip_unhashed)) { 178 if (ocfs2_match_dentry(dentry, parent_blkno, skip_unhashed)) {
178 mlog(0, "dentry found: %.*s\n", 179 mlog(0, "dentry found: %.*s\n",
179 dentry->d_name.len, dentry->d_name.name); 180 dentry->d_name.len, dentry->d_name.name);
180 181
181 dget_locked(dentry); 182 dget_locked_dlock(dentry);
183 spin_unlock(&dentry->d_lock);
182 break; 184 break;
183 } 185 }
186 spin_unlock(&dentry->d_lock);
184 187
185 dentry = NULL; 188 dentry = NULL;
186 } 189 }