Showing error 1206

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: 737
Project: Linux Kernel
Project version: 2.6.28
Tools: Stanse (1.2)
Entered: 2012-04-30 10:52:00 UTC


Source:

707            ((xip->i_d.di_mode & (S_ISGID | S_IXGRP)) ==
708                (S_ISGID | S_IXGRP))) &&
709             !capable(CAP_FSETID)) {
710                error = xfs_write_clear_setuid(xip);
711                if (likely(!error))
712                        error = -file_remove_suid(file);
713                if (unlikely(error)) {
714                        goto out_unlock_internal;
715                }
716        }
717
718retry:
719        /* We can write back this queue in page reclaim */
720        current->backing_dev_info = mapping->backing_dev_info;
721
722        if ((ioflags & IO_ISDIRECT)) {
723                if (mapping->nrpages) {
724                        WARN_ON(need_i_mutex == 0);
725                        xfs_inval_cached_trace(xip, pos, -1,
726                                        (pos & PAGE_CACHE_MASK), -1);
727                        error = xfs_flushinval_pages(xip,
728                                        (pos & PAGE_CACHE_MASK),
729                                        -1, FI_REMAPF_LOCKED);
730                        if (error)
731                                goto out_unlock_internal;
732                }
733
734                if (need_i_mutex) {
735                        /* demote the lock now the cached pages are gone */
736                        xfs_ilock_demote(xip, XFS_IOLOCK_EXCL);
737                        mutex_unlock(&inode->i_mutex);
738
739                        iolock = XFS_IOLOCK_SHARED;
740                        need_i_mutex = 0;
741                }
742
743                 xfs_rw_enter_trace(XFS_DIOWR_ENTER, xip, (void *)iovp, segs,
744                                *offset, ioflags);
745                ret = generic_file_direct_write(iocb, iovp,
746                                &segs, pos, offset, count, ocount);
747
Show full sources