Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-19957

__ll_page_mkwrite() redundant check

    XMLWordPrintable

Details

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

    Description

      smatch highlights this:

               if (result == 0) {
                      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;
      

      the result is checked twice for no reason.

      The problem introduced by this patch: http://review.whamcloud.com/5222

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: