Showing error 1141

User: Jiri Slaby
Error type: Double Lock
Error type description: Some lock is locked twice unintentionally in a sequence
File location: fs/xfs/linux-2.6/xfs_lrw.c
Line in file: 607
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-04-29 14:49:11 UTC


Source:

577        size_t                        ocount = 0, count;
578        loff_t                        pos;
579        int                        need_i_mutex;
580
581        XFS_STATS_INC(xs_write_calls);
582
583        error = generic_segment_checks(iovp, &segs, &ocount, VERIFY_READ);
584        if (error)
585                return error;
586
587        count = ocount;
588        pos = *offset;
589
590        if (count == 0)
591                return 0;
592
593        mp = xip->i_mount;
594
595        xfs_wait_for_freeze(mp, SB_FREEZE_WRITE);
596
597        if (XFS_FORCED_SHUTDOWN(mp))
598                return -EIO;
599
600relock:
601        if (ioflags & IO_ISDIRECT) {
602                iolock = XFS_IOLOCK_SHARED;
603                need_i_mutex = 0;
604        } else {
605                iolock = XFS_IOLOCK_EXCL;
606                need_i_mutex = 1;
607                mutex_lock(&inode->i_mutex);
608        }
609
610        xfs_ilock(xip, XFS_ILOCK_EXCL|iolock);
611
612start:
613        error = -generic_write_checks(file, &pos, &count,
614                                        S_ISBLK(inode->i_mode));
615        if (error) {
616                xfs_iunlock(xip, XFS_ILOCK_EXCL|iolock);
617                goto out_unlock_mutex;
Show full sources