Merge tag '9p-for-6.7-rc1' of https://github.com/martinetd/linux
[sfrench/cifs-2.6.git] / fs / 9p / xattr.c
index 053d1cef6e13179cc3a48ce609352712d12c6d3d..8604e3377ee7abafec9c05e2fb8474664705f097 100644 (file)
@@ -68,7 +68,7 @@ ssize_t v9fs_xattr_get(struct dentry *dentry, const char *name,
        struct p9_fid *fid;
        int ret;
 
-       p9_debug(P9_DEBUG_VFS, "name = %s value_len = %zu\n",
+       p9_debug(P9_DEBUG_VFS, "name = '%s' value_len = %zu\n",
                 name, buffer_size);
        fid = v9fs_fid_lookup(dentry);
        if (IS_ERR(fid))
@@ -139,7 +139,8 @@ int v9fs_fid_xattr_set(struct p9_fid *fid, const char *name,
 
 ssize_t v9fs_listxattr(struct dentry *dentry, char *buffer, size_t buffer_size)
 {
-       return v9fs_xattr_get(dentry, NULL, buffer, buffer_size);
+       /* Txattrwalk with an empty string lists xattrs instead */
+       return v9fs_xattr_get(dentry, "", buffer, buffer_size);
 }
 
 static int v9fs_xattr_handler_get(const struct xattr_handler *handler,