Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bccb9dad8949cd0df1d3d2188a1fdb4b1936d537
Commit:     bccb9dad8949cd0df1d3d2188a1fdb4b1936d537
Parent:     5a58c3ef22d6e5b84ff651a7d27ae2cbea9f9870
Author:     Mark Fasheh <[EMAIL PROTECTED]>
AuthorDate: Wed Nov 7 16:35:14 2007 -0800
Committer:  Mark Fasheh <[EMAIL PROTECTED]>
CommitDate: Tue Nov 27 16:47:02 2007 -0800

    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 <[EMAIL PROTECTED]>
---
 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 1957a5e..9923278 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)
 {
        struct ocfs2_dentry_lock *dl = dentry->d_fsdata;
 
-       mlog_bug_on_msg(!dl && !(dentry->d_flags & DCACHE_DISCONNECTED),
-                       "dentry: %.*s\n", dentry->d_name.len,
-                       dentry->d_name.name);
+       if (!dl) {
+               /*
+                * No dentry lock is ok if we're disconnected or
+                * unhashed.
+                */
+               if (!(dentry->d_flags & DCACHE_DISCONNECTED) &&
+                   !d_unhashed(dentry)) {
+                       unsigned long long ino = 0ULL;
+                       if (inode)
+                               ino = (unsigned long 
long)OCFS2_I(inode)->ip_blkno;
+                       mlog(ML_ERROR, "Dentry is missing cluster lock. "
+                            "inode: %llu, d_flags: 0x%x, d_name: %.*s\n",
+                            ino, dentry->d_flags, dentry->d_name.len,
+                            dentry->d_name.name);
+               }
 
-       if (!dl)
                goto out;
+       }
 
        mlog_bug_on_msg(dl->dl_count == 0, "dentry: %.*s, count: %u\n",
                        dentry->d_name.len, dentry->d_name.name,
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to