aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/cifs/smb2ops.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
index b76b85881dcc..9c6d95ffca97 100644
--- a/fs/cifs/smb2ops.c
+++ b/fs/cifs/smb2ops.c
@@ -589,9 +589,15 @@ smb2_query_eas(const unsigned int xid, struct cifs_tcon *tcon,
589 589
590 SMB2_close(xid, tcon, fid.persistent_fid, fid.volatile_fid); 590 SMB2_close(xid, tcon, fid.persistent_fid, fid.volatile_fid);
591 591
592 /*
593 * If ea_name is NULL (listxattr) and there are no EAs, return 0 as it's
594 * not an error. Otherwise, the specified ea_name was not found.
595 */
592 if (!rc) 596 if (!rc)
593 rc = move_smb2_ea_to_cifs(ea_data, buf_size, smb2_data, 597 rc = move_smb2_ea_to_cifs(ea_data, buf_size, smb2_data,
594 SMB2_MAX_EA_BUF, ea_name); 598 SMB2_MAX_EA_BUF, ea_name);
599 else if (!ea_name && rc == -ENODATA)
600 rc = 0;
595 601
596 kfree(smb2_data); 602 kfree(smb2_data);
597 return rc; 603 return rc;