OSDN Git Service

ceph: don't request vxattrs from MDS
authorYan, Zheng <zyan@redhat.com>
Sat, 12 Mar 2016 05:32:16 +0000 (13:32 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Fri, 25 Mar 2016 17:51:55 +0000 (18:51 +0100)
It's uselese because MDS reply does not carry any vxattr.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
fs/ceph/xattr.c

index 1e1c00a..139cdef 100644 (file)
@@ -727,8 +727,10 @@ ssize_t __ceph_getxattr(struct inode *inode, const char *name, void *value,
 
        /* let's see if a virtual xattr was requested */
        vxattr = ceph_match_vxattr(inode, name);
-       if (vxattr && !(vxattr->exists_cb && !vxattr->exists_cb(ci))) {
-               err = vxattr->getxattr_cb(ci, value, size);
+       if (vxattr) {
+               err = -ENODATA;
+               if (!(vxattr->exists_cb && !vxattr->exists_cb(ci)))
+                       err = vxattr->getxattr_cb(ci, value, size);
                return err;
        }