Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
filesystems
lustre_2_12
0014-LU-13465-vfs-make-ll_vfs_setxattr-return-E...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0014-LU-13465-vfs-make-ll_vfs_setxattr-return-EOPNOTSUPP.patch of Package lustre_2_12
From 2ff8a867bf15e110ea7ad6ec303efee5692a19db Mon Sep 17 00:00:00 2001 From: Sebastien Buisson <sbuisson@ddn.com> Date: Tue, 21 Apr 2020 09:28:20 +0200 Subject: [PATCH 14/35] LU-13465 vfs: make ll_vfs_setxattr return -EOPNOTSUPP New compat macros ll_vfs_setxattr/ll_vfs_removexattr need to return -EOPNOTSUPP instead of -ENOTSUPP. Indeed, the llapi_layout_get_by_fd() code checks for "-EOPNOTSUPP" and handles this specially. Also, the case of missing i_op->setxattr() and i_op->getxattr() can be considered unlikely. Test-Parameters: clientversion=2.12 envdefinitions=SANITY_EXCEPT="27M 56ra 151 156 802" Signed-off-by: Sebastien Buisson <sbuisson@ddn.com> Change-Id: I2474c184a1597979971881de84638fb8d281f704 Reviewed-on: https://review.whamcloud.com/38301 Reviewed-by: Andreas Dilger <adilger@whamcloud.com> Tested-by: jenkins <devops@whamcloud.com> Tested-by: Maloo <maloo@whamcloud.com> Reviewed-by: James Simmons <jsimmons@infradead.org> Reviewed-by: Oleg Drokin <green@whamcloud.com> --- lustre/include/lustre_compat.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lustre/include/lustre_compat.h b/lustre/include/lustre_compat.h index 6c5630eb708b..887aeb3fae9d 100644 --- a/lustre/include/lustre_compat.h +++ b/lustre/include/lustre_compat.h @@ -802,7 +802,7 @@ static inline int ll_vfs_getxattr(struct dentry *dentry, struct inode *inode, void *value, size_t size) { #ifndef HAVE_VFS_SETXATTR - if (!inode->i_op->getxattr) + if (unlikely(!inode->i_op->getxattr)) return -ENODATA; return inode->i_op->getxattr(dentry, name, value, size); @@ -816,8 +816,8 @@ static inline int ll_vfs_setxattr(struct dentry *dentry, struct inode *inode, const void *value, size_t size, int flags) { #ifndef HAVE_VFS_SETXATTR - if (!inode->i_op->setxattr) - return -ENOTSUPP; + if (unlikely(!inode->i_op->setxattr)) + return -EOPNOTSUPP; return inode->i_op->setxattr(dentry, name, value, size, flags); #else @@ -829,8 +829,8 @@ static inline int ll_vfs_removexattr(struct dentry *dentry, struct inode *inode, const char *name) { #ifndef HAVE_VFS_SETXATTR - if (!inode->i_op->setxattr) - return -ENOTSUPP; + if (unlikely(!inode->i_op->setxattr)) + return -EOPNOTSUPP; return inode->i_op->removexattr(dentry, name); #else -- 2.41.0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor