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

protect cli->cl_import with with_imp_locked()

    XMLWordPrintable

Details

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

    Description

      Protect cli->cl_import with with_imp_locked():

      /* You must use these macros when you want to refer to
       * the import in a client obd_device for a lprocfs entry
       */
      #define with_imp_locked(__obd, __imp, __rc)                             \
              for (down_read(&(__obd)->u.cli.cl_sem),                         \
                   __imp = (__obd)->u.cli.cl_import,                          \
                   __rc = __imp ? 0 : -ENODEV;                                \
                   __imp ? 1 : (up_read(&(__obd)->u.cli.cl_sem), 0);          \
                   __imp = NULL)
      

      Attachments

        Issue Links

          Activity

            People

              neilb Neil Brown
              yujian Jian Yu
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: