aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2
diff options
context:
space:
mode:
authorMark Fasheh <mark.fasheh@oracle.com>2007-11-07 19:35:14 -0500
committerMark Fasheh <mark.fasheh@oracle.com>2007-11-27 19:47:02 -0500
commitbccb9dad8949cd0df1d3d2188a1fdb4b1936d537 (patch)
tree93301cb788cdda02acf46f0222e09ed4be504207 /fs/ocfs2
parent5a58c3ef22d6e5b84ff651a7d27ae2cbea9f9870 (diff)
ocfs2: Remove bug statement in ocfs2_dentry_iput()
The existing bug statement didn't take into account unhashed dentries which might not have a cluster lock on them. This could happen if a node exporting the file system via NFS is rebooted, re-exported to nfs clients and then unmounted. It's fine in this case to not have a dentry cluster lock. Just remove the bug statement and replace it with an error print, which does the proper checks. Though we want to know if something has happened which might have prevented a cluster lock from being created, it's definitely not necessary to panic the machine for this. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Diffstat (limited to 'fs/ocfs2')
-rw-r--r--fs/ocfs2/dcache.c20
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,