diff options
Diffstat (limited to 'fs/ocfs2/dcache.c')
-rw-r--r-- | fs/ocfs2/dcache.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/fs/ocfs2/dcache.c b/fs/ocfs2/dcache.c index 1957a5ed219e..9923278ea6d4 100644 --- a/fs/ocfs2/dcache.c +++ b/fs/ocfs2/dcache.c | |||
@@ -344,12 +344,24 @@ static void ocfs2_dentry_iput(struct dentry *dentry, struct inode *inode) | |||
344 | { | 344 | { |
345 | struct ocfs2_dentry_lock *dl = dentry->d_fsdata; | 345 | struct ocfs2_dentry_lock *dl = dentry->d_fsdata; |
346 | 346 | ||
347 | mlog_bug_on_msg(!dl && !(dentry->d_flags & DCACHE_DISCONNECTED), | 347 | if (!dl) { |
348 | "dentry: %.*s\n", dentry->d_name.len, | 348 | /* |
349 | dentry->d_name.name); | 349 | * No dentry lock is ok if we're disconnected or |
350 | * unhashed. | ||
351 | */ | ||
352 | if (!(dentry->d_flags & DCACHE_DISCONNECTED) && | ||
353 | !d_unhashed(dentry)) { | ||
354 | unsigned long long ino = 0ULL; | ||
355 | if (inode) | ||
356 | ino = (unsigned long long)OCFS2_I(inode)->ip_blkno; | ||
357 | mlog(ML_ERROR, "Dentry is missing cluster lock. " | ||
358 | "inode: %llu, d_flags: 0x%x, d_name: %.*s\n", | ||
359 | ino, dentry->d_flags, dentry->d_name.len, | ||
360 | dentry->d_name.name); | ||
361 | } | ||
350 | 362 | ||
351 | if (!dl) | ||
352 | goto out; | 363 | goto out; |
364 | } | ||
353 | 365 | ||
354 | mlog_bug_on_msg(dl->dl_count == 0, "dentry: %.*s, count: %u\n", | 366 | mlog_bug_on_msg(dl->dl_count == 0, "dentry: %.*s, count: %u\n", |
355 | dentry->d_name.len, dentry->d_name.name, | 367 | dentry->d_name.len, dentry->d_name.name, |