Showing error 1710

User: Jiri Slaby
Error type: Double Unlock
Error type description: Some lock is unlocked twice unintentionally in a sequence
File location: fs/xfs/xfs_vfsops.c
Line in file: 590
Project: Linux Kernel
Project version: 2.6.28
Tools: Smatch (1.59)
Entered: 2013-09-10 15:16:58 UTC


Source:

560                         * the inode to release the reference.  This is
561                         * because we can be already holding the inode
562                         * lock when IRELE() calls xfs_inactive().
563                         *
564                         * Make sure to drop the mount lock before calling
565                         * IRELE() so that we don't trip over ourselves if
566                         * we have to go for the mount lock again in the
567                         * inactive code.
568                         */
569                        if (mount_locked) {
570                                IPOINTER_INSERT(ip, mp);
571                        }
572
573                        IRELE(ip);
574
575                        vnode_refed = B_FALSE;
576                }
577
578                if (error) {
579                        last_error = error;
580                }
581
582                /*
583                 * bail out if the filesystem is corrupted.
584                 */
585                if (error == EFSCORRUPTED)  {
586                        if (!mount_locked) {
587                                XFS_MOUNT_ILOCK(mp);
588                                IPOINTER_REMOVE(ip, mp);
589                        }
590                        XFS_MOUNT_IUNLOCK(mp);
591                        ASSERT(ipointer_in == B_FALSE);
592                        kmem_free(ipointer);
593                        return XFS_ERROR(error);
594                }
595
596                /* Let other threads have a chance at the mount lock
597                 * if we have looped many times without dropping the
598                 * lock.
599                 */
600                if ((++preempt & XFS_PREEMPT_MASK) == 0) {
Show full sources