Showing error 642

User: Jiri Slaby
Error type: Double Unlock
Error type description: Some lock is unlocked twice unintentionally in a sequence
File location: fs/dcache.c
Line in file: 248
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2011-11-07 22:20:57 UTC


Source:

 218                return;
 219
 220repeat:
 221        if (atomic_read(&dentry->d_count) == 1)
 222                might_sleep();
 223        if (!atomic_dec_and_lock(&dentry->d_count, &dcache_lock))
 224                return;
 225
 226        spin_lock(&dentry->d_lock);
 227        if (atomic_read(&dentry->d_count)) {
 228                spin_unlock(&dentry->d_lock);
 229                spin_unlock(&dcache_lock);
 230                return;
 231        }
 232
 233        /*
 234         * AV: ->d_delete() is _NOT_ allowed to block now.
 235         */
 236        if (dentry->d_op && dentry->d_op->d_delete) {
 237                if (dentry->d_op->d_delete(dentry))
 238                        goto unhash_it;
 239        }
 240        /* Unreachable? Get rid of it */
 241         if (d_unhashed(dentry))
 242                goto kill_it;
 243          if (list_empty(&dentry->d_lru)) {
 244                  dentry->d_flags |= DCACHE_REFERENCED;
 245                dentry_lru_add(dentry);
 246          }
 247         spin_unlock(&dentry->d_lock);
 248        spin_unlock(&dcache_lock);
 249        return;
 250
 251unhash_it:
 252        __d_drop(dentry);
 253kill_it:
 254        /* if dentry was on the d_lru list delete it from there */
 255        dentry_lru_del(dentry);
 256        dentry = d_kill(dentry);
 257        if (dentry)
 258                goto repeat;
Show full sources