aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorSteve French <smfrench@gmail.com>2014-03-25 20:46:36 -0400
committerSteve French <smfrench@gmail.com>2014-04-16 14:51:46 -0400
commit60977fcc808664f82412bb37da7be17640ba99d9 (patch)
tree8fa82254a78e80ddafe5b0aadb3e1f6902459b13 /fs
parentc11f1df5003d534fd067f0168bfad7befffb3b5c (diff)
Return correct error on query of xattr on file with empty xattrs
xfstest 020 detected a problem with cifs xattr handling. When a file had an empty xattr list, we returned success (with an empty xattr value) on query of particular xattrs rather than returning ENODATA. This patch fixes it so that query of an xattr returns ENODATA when the xattr list is empty for the file. Signed-off-by: Steve French <smfrench@gmail.com> Reviewed-by: Jeff Layton <jlayton@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/cifs/cifssmb.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index f3264bd7a83d..6ce4e0954b98 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -6197,6 +6197,9 @@ QAllEAsRetry:
6197 cifs_dbg(FYI, "ea length %d\n", list_len); 6197 cifs_dbg(FYI, "ea length %d\n", list_len);
6198 if (list_len <= 8) { 6198 if (list_len <= 8) {
6199 cifs_dbg(FYI, "empty EA list returned from server\n"); 6199 cifs_dbg(FYI, "empty EA list returned from server\n");
6200 /* didn't find the named attribute */
6201 if (ea_name)
6202 rc = -ENODATA;
6200 goto QAllEAsOut; 6203 goto QAllEAsOut;
6201 } 6204 }
6202 6205