|
@@ -589,9 +589,15 @@ smb2_query_eas(const unsigned int xid, struct cifs_tcon *tcon,
|
|
|
|
|
|
SMB2_close(xid, tcon, fid.persistent_fid, fid.volatile_fid);
|
|
SMB2_close(xid, tcon, fid.persistent_fid, fid.volatile_fid);
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
+ * If ea_name is NULL (listxattr) and there are no EAs, return 0 as it's
|
|
|
|
+ * not an error. Otherwise, the specified ea_name was not found.
|
|
|
|
+ */
|
|
if (!rc)
|
|
if (!rc)
|
|
rc = move_smb2_ea_to_cifs(ea_data, buf_size, smb2_data,
|
|
rc = move_smb2_ea_to_cifs(ea_data, buf_size, smb2_data,
|
|
SMB2_MAX_EA_BUF, ea_name);
|
|
SMB2_MAX_EA_BUF, ea_name);
|
|
|
|
+ else if (!ea_name && rc == -ENODATA)
|
|
|
|
+ rc = 0;
|
|
|
|
|
|
kfree(smb2_data);
|
|
kfree(smb2_data);
|
|
return rc;
|
|
return rc;
|