Showing error 1205

User: Jiri Slaby
Error type: Double Unlock
Error type description: Some lock is unlocked twice unintentionally in a sequence
File location: fs/xfs/linux-2.6/xfs_lrw.c
Line in file: 845
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-04-30 10:52:00 UTC


Source:

815                        mutex_unlock(&inode->i_mutex);
816                error2 = sync_page_range(inode, mapping, pos, ret);
817                if (!error)
818                        error = error2;
819                if (need_i_mutex)
820                        mutex_lock(&inode->i_mutex);
821                xfs_ilock(xip, iolock);
822                error2 = xfs_write_sync_logforce(mp, xip);
823                if (!error)
824                        error = error2;
825        }
826
827 out_unlock_internal:
828        if (xip->i_new_size) {
829                xfs_ilock(xip, XFS_ILOCK_EXCL);
830                xip->i_new_size = 0;
831                /*
832                 * If this was a direct or synchronous I/O that failed (such
833                 * as ENOSPC) then part of the I/O may have been written to
834                 * disk before the error occured.  In this case the on-disk
835                 * file size may have been adjusted beyond the in-memory file
836                 * size and now needs to be truncated back.
837                 */
838                if (xip->i_d.di_size > xip->i_size)
839                        xip->i_d.di_size = xip->i_size;
840                xfs_iunlock(xip, XFS_ILOCK_EXCL);
841        }
842        xfs_iunlock(xip, iolock);
843 out_unlock_mutex:
844        if (need_i_mutex)
845                mutex_unlock(&inode->i_mutex);
846        return -error;
847}
848
849/*
850 * All xfs metadata buffers except log state machine buffers
851 * get this attached as their b_bdstrat callback function.
852 * This is so that we can catch a buffer
853 * after prematurely unpinning it to forcibly shutdown the filesystem.
854 */
855int
Show full sources