Showing error 1199

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


Source:

 225        struct inode *inode = page->mapping->host;
 226        struct nfs_page *req;
 227        int ret;
 228
 229        spin_lock(&inode->i_lock);
 230        for(;;) {
 231                req = nfs_page_find_request_locked(page);
 232                if (req == NULL) {
 233                        spin_unlock(&inode->i_lock);
 234                        return 0;
 235                }
 236                if (nfs_set_page_tag_locked(req))
 237                        break;
 238                /* Note: If we hold the page lock, as is the case in nfs_writepage,
 239                 *         then the call to nfs_set_page_tag_locked() will always
 240                 *         succeed provided that someone hasn't already marked the
 241                 *         request as dirty (in which case we don't care).
 242                 */
 243                spin_unlock(&inode->i_lock);
 244                ret = nfs_wait_on_request(req);
 245                nfs_release_request(req);
 246                if (ret != 0)
 247                        return ret;
 248                spin_lock(&inode->i_lock);
 249        }
 250        if (test_bit(PG_CLEAN, &req->wb_flags)) {
 251                spin_unlock(&inode->i_lock);
 252                BUG();
 253        }
 254        if (nfs_set_page_writeback(page) != 0) {
 255                spin_unlock(&inode->i_lock);
 256                BUG();
 257        }
 258        spin_unlock(&inode->i_lock);
 259        if (!nfs_pageio_add_request(pgio, req)) {
 260                nfs_redirty_request(req);
 261                return pgio->pg_error;
 262        }
 263        return 0;
 264}
 265
Show full sources