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

__vfs_setxattr() should pass flags through

    XMLWordPrintable

Details

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

    Description

      In the compat definition of __vfs_setxattr() we should pass the value of flags that we received rather than XATTR_CREATE:

      #ifdef HAVE_XATTR_HANDLER_FLAGS
      static inline int
      __vfs_setxattr(struct dentry *dentry, struct inode *inode, const char *name,
                     const void *value, size_t size, int flags)
      {
              const struct xattr_handler *handler;
              int rc;
      
              handler = get_xattr_type(name);
              if (!handler)
                      return -ENXIO;
      
      #if defined(HAVE_XATTR_HANDLER_INODE_PARAM)
              rc = handler->set(handler, dentry, inode, name, value, size,
                                XATTR_CREATE);
      #elif defined(HAVE_XATTR_HANDLER_SIMPLIFIED)
              rc = handler->set(handler, dentry, name, value, size, XATTR_CREATE);
      #else
              rc = handler->set(dentry, name, value, size, XATTR_CREATE,
                                handler->flags);
      #endif /* !HAVE_XATTR_HANDLER_INODE_PARAM */
              return rc;
      }
      

      This is minor now since we only pass XATTR_CREATE to __vfs_setxattr().

      Attachments

        Issue Links

          Activity

            People

              jhammond John Hammond
              jhammond John Hammond
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: