浏览代码

cifs: demote DFS referral lookup errors to cFYI

cifs: demote DFS referral lookup errors to cFYI

Now that we call into this routine on every mount, anyone who doesn't
have the upcall configured will get multiple printks about failed lookups.

Reported-and-Tested-by: Martijn Uffing <mp3project@sarijopen.student.utwente.nl>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Jeff Layton 14 年之前
父节点
当前提交
b802898334
共有 2 个文件被更改,包括 5 次插入4 次删除
  1. 3 2
      fs/cifs/cifs_dfs_ref.c
  2. 2 2
      fs/cifs/dns_resolve.c

+ 3 - 2
fs/cifs/cifs_dfs_ref.c

@@ -141,10 +141,11 @@ char *cifs_compose_mount_options(const char *sb_mountdata,
 
 
 	rc = dns_resolve_server_name_to_ip(*devname, &srvIP);
 	rc = dns_resolve_server_name_to_ip(*devname, &srvIP);
 	if (rc < 0) {
 	if (rc < 0) {
-		cERROR(1, "%s: Failed to resolve server part of %s to IP: %d",
-			  __func__, *devname, rc);
+		cFYI(1, "%s: Failed to resolve server part of %s to IP: %d",
+			__func__, *devname, rc);
 		goto compose_mount_options_err;
 		goto compose_mount_options_err;
 	}
 	}
+
 	/* md_len = strlen(...) + 12 for 'sep+prefixpath='
 	/* md_len = strlen(...) + 12 for 'sep+prefixpath='
 	 * assuming that we have 'unc=' and 'ip=' in
 	 * assuming that we have 'unc=' and 'ip=' in
 	 * the original sb_mountdata
 	 * the original sb_mountdata

+ 2 - 2
fs/cifs/dns_resolve.c

@@ -79,8 +79,8 @@ dns_resolve_server_name_to_ip(const char *unc, char **ip_addr)
 	/* Perform the upcall */
 	/* Perform the upcall */
 	rc = dns_query(NULL, hostname, len, NULL, ip_addr, NULL);
 	rc = dns_query(NULL, hostname, len, NULL, ip_addr, NULL);
 	if (rc < 0)
 	if (rc < 0)
-		cERROR(1, "%s: unable to resolve: %*.*s",
-		       __func__, len, len, hostname);
+		cFYI(1, "%s: unable to resolve: %*.*s",
+			__func__, len, len, hostname);
 	else
 	else
 		cFYI(1, "%s: resolved: %*.*s to %s",
 		cFYI(1, "%s: resolved: %*.*s to %s",
 		     __func__, len, len, hostname, *ip_addr);
 		     __func__, len, len, hostname, *ip_addr);