1111#include <linux/xattr.h>
1212#include "internal.h"
1313
14- static const char afs_xattr_list [] =
15- "afs.acl\0"
16- "afs.cell\0"
17- "afs.fid\0"
18- "afs.volume\0"
19- "afs.yfs.acl\0"
20- "afs.yfs.acl_inherited\0"
21- "afs.yfs.acl_num_cleaned\0"
22- "afs.yfs.vol_acl" ;
23-
24- /*
25- * Retrieve a list of the supported xattrs.
26- */
27- ssize_t afs_listxattr (struct dentry * dentry , char * buffer , size_t size )
28- {
29- if (size == 0 )
30- return sizeof (afs_xattr_list );
31- if (size < sizeof (afs_xattr_list ))
32- return - ERANGE ;
33- memcpy (buffer , afs_xattr_list , sizeof (afs_xattr_list ));
34- return sizeof (afs_xattr_list );
35- }
36-
3714/*
3815 * Deal with the result of a successful fetch ACL operation.
3916 */
@@ -231,6 +208,8 @@ static int afs_xattr_get_yfs(const struct xattr_handler *handler,
231208 else
232209 ret = - ERANGE ;
233210 }
211+ } else if (ret == - ENOTSUPP ) {
212+ ret = - ENODATA ;
234213 }
235214
236215error_yacl :
@@ -256,6 +235,7 @@ static int afs_xattr_set_yfs(const struct xattr_handler *handler,
256235{
257236 struct afs_operation * op ;
258237 struct afs_vnode * vnode = AFS_FS_I (inode );
238+ int ret ;
259239
260240 if (flags == XATTR_CREATE ||
261241 strcmp (name , "acl" ) != 0 )
@@ -270,7 +250,10 @@ static int afs_xattr_set_yfs(const struct xattr_handler *handler,
270250 return afs_put_operation (op );
271251
272252 op -> ops = & yfs_store_opaque_acl2_operation ;
273- return afs_do_sync_operation (op );
253+ ret = afs_do_sync_operation (op );
254+ if (ret == - ENOTSUPP )
255+ ret = - ENODATA ;
256+ return ret ;
274257}
275258
276259static const struct xattr_handler afs_xattr_yfs_handler = {
0 commit comments