[LU-10788] __vfs_setxattr() should pass flags through Created: 07/Mar/18  Updated: 09/Apr/18  Resolved: 09/Apr/18

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.12.0

Type: Bug Priority: Minor
Reporter: John Hammond Assignee: John Hammond
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Related
is related to LU-9679 Prepare lustre for adoption into the ... Resolved
Severity: 3
Rank (Obsolete): 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().



 Comments   
Comment by Gerrit Updater [ 08/Mar/18 ]

John L. Hammond (john.hammond@intel.com) uploaded a new patch: https://review.whamcloud.com/31593
Subject: LU-10788 llite: pass flags through __vfs_setxattr()
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 92a4954394364d351c30eb17055504223b686542

Comment by Gerrit Updater [ 09/Apr/18 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/31593/
Subject: LU-10788 llite: pass flags through __vfs_setxattr()
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 4753bae7f3939ff08e70cf9efc1a26b4bf2d29fe

Comment by Peter Jones [ 09/Apr/18 ]

Landed for 2.12

Generated at Sat Feb 10 02:38:11 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.