Details

    • Bug
    • Resolution: Unresolved
    • Minor
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      I am playing with new version of smatch and it highlighted this interesting piece in ll_page_mkwrite0:

              if (result == 0) {
                      struct inode *inode = vma->vm_file->f_dentry->d_inode;
                      struct ll_inode_info *lli = ll_i2info(inode);
      
                      lock_page(vmpage);
                      if (vmpage->mapping == NULL) {
                              unlock_page(vmpage);
      
                              /* page was truncated and lock was cancelled, return
                               * ENODATA so that VM_FAULT_NOPAGE will be returned
                               * to handle_mm_fault(). */
                              if (result == 0)
                                      result = -ENODATA;
      

      So we are on a path that already checked result to be 0 and then we check again? Is there a missing call to somewhere?

      Attachments

        Activity

          [LU-6497] strange code in ll_page_mkwrite0

          Still in 2.16.54.

          adilger Andreas Dilger added a comment - Still in 2.16.54.

          People

            wc-triage WC Triage
            green Oleg Drokin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: