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

__dquot_alloc_space() does not release i_lock in some cases

Details

    • 3
    • 11804

    Description

      The patch removing the dqptr sem seems to have introduced a regression. In __dquot_alloc_space(), the i_lock is not released if we exit through the goto out_flush_warn.

      int __dquot_alloc_space(struct inode *inode, qsize_t number, int flags)
      ...
              spin_lock(&inode->i_lock);
      ...
              spin_lock(&dq_data_lock);
      ...
                      if (check_bdq(dquot[cnt], number, warn, warntype+cnt)
                          == NO_QUOTA && !nofail) {
                              ret = NO_QUOTA;
                              spin_unlock(&dq_data_lock);
                              goto out_flush_warn;
                      }
      ...
      out_flush_warn:
              flush_warnings(dquot, warntype);
              for (cnt = 0; cnt < MAXQUOTAS; cnt++)
                      dqput(dquot[cnt]);
      out:
              return ret;
      }
      

      Many thanks to Andrew Perepechko for reporting the problem.

      Attachments

        Activity

          [LU-4310] __dquot_alloc_space() does not release i_lock in some cases
          pjones Peter Jones made changes -
          Fix Version/s New: Lustre 2.5.1 [ 10608 ]
          Labels Original: mq114
          pjones Peter Jones made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          bogl Bob Glossman (Inactive) made changes -
          Link New: This issue is related to INTL-25 [ INTL-25 ]
          yujian Jian Yu made changes -
          Fix Version/s New: Lustre 2.4.2 [ 10605 ]
          pjones Peter Jones made changes -
          Labels Original: mq114 mq413 New: mq114
          pjones Peter Jones made changes -
          Labels Original: mq114 New: mq114 mq413
          jlevi Jodi Levi (Inactive) made changes -
          Fix Version/s New: Lustre 2.6.0 [ 10595 ]
          Priority Original: Critical [ 2 ] New: Blocker [ 1 ]
          pjones Peter Jones made changes -
          Fix Version/s Original: Lustre 2.6.0 [ 10595 ]
          Labels New: mq114
          Priority Original: Blocker [ 1 ] New: Critical [ 2 ]
          jlevi Jodi Levi (Inactive) made changes -
          Fix Version/s New: Lustre 2.6.0 [ 10595 ]
          Priority Original: Critical [ 2 ] New: Blocker [ 1 ]
          johann Johann Lombardi (Inactive) made changes -
          Assignee Original: WC Triage [ wc-triage ] New: Johann Lombardi [ johann ]
          johann Johann Lombardi (Inactive) created issue -

          People

            johann Johann Lombardi (Inactive)
            johann Johann Lombardi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            13 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: