Showing error 1767

User: Jiri Slaby
Error type: Invalid Pointer Dereference
Error type description: A pointer which is invalid is being dereferenced
File location: fs/xfs/xfs_log.c
Line in file: 603
Project: Linux Kernel
Project version: 2.6.28
Tools: Smatch (1.59)
Entered: 2013-09-10 20:24:52 UTC


Source:

 573         * Initialize the AIL now we have a log.
 574         */
 575        spin_lock_init(&mp->m_ail_lock);
 576        error = xfs_trans_ail_init(mp);
 577        if (error) {
 578                cmn_err(CE_WARN, "XFS: AIL initialisation failed: error %d", error);
 579                goto error;
 580        }
 581
 582        /*
 583         * skip log recovery on a norecovery mount.  pretend it all
 584         * just worked.
 585         */
 586        if (!(mp->m_flags & XFS_MOUNT_NORECOVERY)) {
 587                int        readonly = (mp->m_flags & XFS_MOUNT_RDONLY);
 588
 589                if (readonly)
 590                        mp->m_flags &= ~XFS_MOUNT_RDONLY;
 591
 592                error = xlog_recover(mp->m_log);
 593
 594                if (readonly)
 595                        mp->m_flags |= XFS_MOUNT_RDONLY;
 596                if (error) {
 597                        cmn_err(CE_WARN, "XFS: log mount/recovery failed: error %d", error);
 598                        goto error;
 599                }
 600        }
 601
 602        /* Normal transactions can now occur */
 603        mp->m_log->l_flags &= ~XLOG_ACTIVE_RECOVERY;
 604
 605        /* End mounting message in xfs_log_mount_finish */
 606        return 0;
 607error:
 608        xfs_log_unmount_dealloc(mp);
 609out:
 610        return error;
 611}        /* xfs_log_mount */
 612
 613/*
Show full sources