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

distribute_txn_commit_batchid_init references ERR_PTR on error path

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • Lustre 2.8.0
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      Recently landed patch http://review.whamcloud.com/11572 has these problems:

      /home/green/smt/git/lustre-release/lustre/ptlrpc/../../lustre/target/update_trans.c:1216 distribute_txn_commit_batchid_init() error: 'dt_obj' dereferencing possible ERR_PTR()
      

      code:

              dt_obj = dt_find_or_create(env, lut->lut_bottom, fid, dof,
                                         attr);
              if (IS_ERR(dt_obj))
                      GOTO(out_put, rc = PTR_ERR(dt_obj));
      ...
      out_put:
              if (rc < 0 && dt_obj != NULL) {
                      lu_object_put(env, &dt_obj->do_lu);
      

      This is clearly wrong.

      Attachments

        Activity

          People

            di.wang Di Wang
            green Oleg Drokin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: