aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/ceph/xattr.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/fs/ceph/xattr.c b/fs/ceph/xattr.c
index 38aef476f786..e29c7d3fa405 100644
--- a/fs/ceph/xattr.c
+++ b/fs/ceph/xattr.c
@@ -24,7 +24,7 @@ static bool ceph_is_valid_xattr(const char *name)
24 * These define virtual xattrs exposing the recursive directory 24 * These define virtual xattrs exposing the recursive directory
25 * statistics and layout metadata. 25 * statistics and layout metadata.
26 */ 26 */
27struct ceph_vxattr_cb { 27struct ceph_vxattr {
28 char *name; 28 char *name;
29 size_t (*getxattr_cb)(struct ceph_inode_info *ci, char *val, 29 size_t (*getxattr_cb)(struct ceph_inode_info *ci, char *val,
30 size_t size); 30 size_t size);
@@ -91,7 +91,7 @@ static size_t ceph_vxattrcb_rctime(struct ceph_inode_info *ci, char *val,
91 .readonly = true, \ 91 .readonly = true, \
92 } 92 }
93 93
94static struct ceph_vxattr_cb ceph_dir_vxattrs[] = { 94static struct ceph_vxattr ceph_dir_vxattrs[] = {
95 XATTR_NAME_CEPH(dir, entries), 95 XATTR_NAME_CEPH(dir, entries),
96 XATTR_NAME_CEPH(dir, files), 96 XATTR_NAME_CEPH(dir, files),
97 XATTR_NAME_CEPH(dir, subdirs), 97 XATTR_NAME_CEPH(dir, subdirs),
@@ -122,7 +122,7 @@ static size_t ceph_vxattrcb_layout(struct ceph_inode_info *ci, char *val,
122 return ret; 122 return ret;
123} 123}
124 124
125static struct ceph_vxattr_cb ceph_file_vxattrs[] = { 125static struct ceph_vxattr ceph_file_vxattrs[] = {
126 XATTR_NAME_CEPH(file, layout), 126 XATTR_NAME_CEPH(file, layout),
127 /* The following extended attribute name is deprecated */ 127 /* The following extended attribute name is deprecated */
128 { 128 {
@@ -133,7 +133,7 @@ static struct ceph_vxattr_cb ceph_file_vxattrs[] = {
133 { 0 } /* Required table terminator */ 133 { 0 } /* Required table terminator */
134}; 134};
135 135
136static struct ceph_vxattr_cb *ceph_inode_vxattrs(struct inode *inode) 136static struct ceph_vxattr *ceph_inode_vxattrs(struct inode *inode)
137{ 137{
138 if (S_ISDIR(inode->i_mode)) 138 if (S_ISDIR(inode->i_mode))
139 return ceph_dir_vxattrs; 139 return ceph_dir_vxattrs;
@@ -142,10 +142,10 @@ static struct ceph_vxattr_cb *ceph_inode_vxattrs(struct inode *inode)
142 return NULL; 142 return NULL;
143} 143}
144 144
145static struct ceph_vxattr_cb *ceph_match_vxattr(struct inode *inode, 145static struct ceph_vxattr *ceph_match_vxattr(struct inode *inode,
146 const char *name) 146 const char *name)
147{ 147{
148 struct ceph_vxattr_cb *vxattr = ceph_inode_vxattrs(inode); 148 struct ceph_vxattr *vxattr = ceph_inode_vxattrs(inode);
149 149
150 if (vxattr) { 150 if (vxattr) {
151 while (vxattr->name) { 151 while (vxattr->name) {
@@ -525,7 +525,7 @@ ssize_t ceph_getxattr(struct dentry *dentry, const char *name, void *value,
525 struct ceph_inode_info *ci = ceph_inode(inode); 525 struct ceph_inode_info *ci = ceph_inode(inode);
526 int err; 526 int err;
527 struct ceph_inode_xattr *xattr; 527 struct ceph_inode_xattr *xattr;
528 struct ceph_vxattr_cb *vxattr = NULL; 528 struct ceph_vxattr *vxattr = NULL;
529 529
530 if (!ceph_is_valid_xattr(name)) 530 if (!ceph_is_valid_xattr(name))
531 return -ENODATA; 531 return -ENODATA;
@@ -587,7 +587,7 @@ ssize_t ceph_listxattr(struct dentry *dentry, char *names, size_t size)
587{ 587{
588 struct inode *inode = dentry->d_inode; 588 struct inode *inode = dentry->d_inode;
589 struct ceph_inode_info *ci = ceph_inode(inode); 589 struct ceph_inode_info *ci = ceph_inode(inode);
590 struct ceph_vxattr_cb *vxattrs = ceph_inode_vxattrs(inode); 590 struct ceph_vxattr *vxattrs = ceph_inode_vxattrs(inode);
591 u32 vir_namelen = 0; 591 u32 vir_namelen = 0;
592 u32 namelen; 592 u32 namelen;
593 int err; 593 int err;
@@ -717,7 +717,7 @@ int ceph_setxattr(struct dentry *dentry, const char *name,
717 const void *value, size_t size, int flags) 717 const void *value, size_t size, int flags)
718{ 718{
719 struct inode *inode = dentry->d_inode; 719 struct inode *inode = dentry->d_inode;
720 struct ceph_vxattr_cb *vxattr; 720 struct ceph_vxattr *vxattr;
721 struct ceph_inode_info *ci = ceph_inode(inode); 721 struct ceph_inode_info *ci = ceph_inode(inode);
722 int err; 722 int err;
723 int name_len = strlen(name); 723 int name_len = strlen(name);
@@ -830,7 +830,7 @@ static int ceph_send_removexattr(struct dentry *dentry, const char *name)
830int ceph_removexattr(struct dentry *dentry, const char *name) 830int ceph_removexattr(struct dentry *dentry, const char *name)
831{ 831{
832 struct inode *inode = dentry->d_inode; 832 struct inode *inode = dentry->d_inode;
833 struct ceph_vxattr_cb *vxattr; 833 struct ceph_vxattr *vxattr;
834 struct ceph_inode_info *ci = ceph_inode(inode); 834 struct ceph_inode_info *ci = ceph_inode(inode);
835 int issued; 835 int issued;
836 int err; 836 int err;