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

__dquot_alloc_space() does not release i_lock in some cases

    XMLWordPrintable

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

          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: