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

ll_ioctl_fssetxattr() may discard errors from md_setattr() and forget to set i_flags

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.12.0
    • None
    • 3
    • 9223372036854775807

    Description

      In ll_ioctl_fssetxattr() we may discard errors from md_setattr(). And we only set the local i_flags when lli_clob is not NULL:

              rc = md_setattr(ll_i2sbi(inode)->ll_md_exp, op_data, NULL,
      			0, &req);
              ptlrpc_req_finished(req);
      
              obj = ll_i2info(inode)->lli_clob;
              if (obj) {
                      struct iattr *attr;
      
                      inode->i_flags = ll_ext_to_inode_flags(fsxattr.fsx_xflags);
                      OBD_ALLOC_PTR(attr);
                      if (attr == NULL)
      			GOTO(out_fsxattr1, rc = -ENOMEM);
                      attr->ia_valid = ATTR_ATTR_FLAG;
                      rc = cl_setattr_ost(obj, attr, fsxattr.fsx_xflags);
      
                      OBD_FREE_PTR(attr);
              }
      out_fsxattr1:
              ll_finish_md_op_data(op_data);
              RETURN(rc);
      }
      

      Attachments

        Activity

          People

            wshilong Wang Shilong (Inactive)
            jhammond John Hammond
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: