Showing error 980

User: Jiri Slaby
Error type: Leaving function in locked state
Error type description: Some lock is not unlocked on all paths of a function, so it is leaked
File location: fs/hpfs/namei.c
Line in file: 659
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-03-02 21:35:17 UTC


Source:

629                hpfs_error(i->i_sb, "hpfs_rename: could not remove dirent");
630                err = r == 2 ? -ENOSPC : -EFSERROR;
631                goto end1;
632        }
633        hpfs_unlock_creation(i->i_sb);
634        
635        end:
636        hpfs_i(i)->i_parent_dir = new_dir->i_ino;
637        if (S_ISDIR(i->i_mode)) {
638                inc_nlink(new_dir);
639                drop_nlink(old_dir);
640        }
641        if ((fnode = hpfs_map_fnode(i->i_sb, i->i_ino, &bh))) {
642                fnode->up = new_dir->i_ino;
643                fnode->len = new_len;
644                memcpy(fnode->name, new_name, new_len>15?15:new_len);
645                if (new_len < 15) memset(&fnode->name[new_len], 0, 15 - new_len);
646                mark_buffer_dirty(bh);
647                brelse(bh);
648        }
649        hpfs_i(i)->i_conv = hpfs_sb(i->i_sb)->sb_conv;
650        hpfs_decide_conv(i, (char *)new_name, new_len);
651end1:
652        if (old_dir != new_dir)
653                mutex_unlock(&hpfs_i(new_dir)->i_mutex);
654        mutex_unlock(&hpfs_i(old_dir)->i_mutex);
655        mutex_unlock(&hpfs_i(i)->i_parent_mutex);
656        if (new_inode)
657                mutex_unlock(&hpfs_i(new_inode)->i_parent_mutex);
658        unlock_kernel();
659        return err;
660}
661
662const struct inode_operations hpfs_dir_iops =
663{
664        .create                = hpfs_create,
665        .lookup                = hpfs_lookup,
666        .unlink                = hpfs_unlink,
667        .symlink        = hpfs_symlink,
668        .mkdir                = hpfs_mkdir,
669        .rmdir                = hpfs_rmdir,
Show full sources