Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2e378f3e authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6

Pull CIFS fixes from Steve French:
 "A set of cifs cleanup fixes.

  The only big one of this set optimizes the cifs error logging,
  renaming cFYI and cERROR macros to cifs_dbg, and in the process makes
  it clearer and reduces module size."

* 'for-next' of git://git.samba.org/sfrench/cifs-2.6:
  cifs: small variable name cleanup
  CIFS: fix error return code in cifs_atomic_open()
  cifs: store the real expected sequence number in the mid
  cifs: on send failure, readjust server sequence number downward
  cifs: remove ENOSPC handling in smb_sendv
  [CIFS] cifs: Rename cERROR and cFYI to cifs_dbg
  fs: cifs: use kmemdup instead of kmalloc + memcpy
  cifs: replaced kmalloc + memset with kzalloc
  cifs: ignore the unc= and prefixpath= mount options
parents ce8a5dbd b13ce4bb
Loading
Loading
Loading
Loading
+20 −20
Original line number Original line Diff line number Diff line
@@ -506,11 +506,11 @@ decode_negTokenInit(unsigned char *security_blob, int length,


	/* GSSAPI header */
	/* GSSAPI header */
	if (asn1_header_decode(&ctx, &end, &cls, &con, &tag) == 0) {
	if (asn1_header_decode(&ctx, &end, &cls, &con, &tag) == 0) {
		cFYI(1, "Error decoding negTokenInit header");
		cifs_dbg(FYI, "Error decoding negTokenInit header\n");
		return 0;
		return 0;
	} else if ((cls != ASN1_APL) || (con != ASN1_CON)
	} else if ((cls != ASN1_APL) || (con != ASN1_CON)
		   || (tag != ASN1_EOC)) {
		   || (tag != ASN1_EOC)) {
		cFYI(1, "cls = %d con = %d tag = %d", cls, con, tag);
		cifs_dbg(FYI, "cls = %d con = %d tag = %d\n", cls, con, tag);
		return 0;
		return 0;
	}
	}


@@ -531,39 +531,39 @@ decode_negTokenInit(unsigned char *security_blob, int length,


	/* SPNEGO OID not present or garbled -- bail out */
	/* SPNEGO OID not present or garbled -- bail out */
	if (!rc) {
	if (!rc) {
		cFYI(1, "Error decoding negTokenInit header");
		cifs_dbg(FYI, "Error decoding negTokenInit header\n");
		return 0;
		return 0;
	}
	}


	/* SPNEGO */
	/* SPNEGO */
	if (asn1_header_decode(&ctx, &end, &cls, &con, &tag) == 0) {
	if (asn1_header_decode(&ctx, &end, &cls, &con, &tag) == 0) {
		cFYI(1, "Error decoding negTokenInit");
		cifs_dbg(FYI, "Error decoding negTokenInit\n");
		return 0;
		return 0;
	} else if ((cls != ASN1_CTX) || (con != ASN1_CON)
	} else if ((cls != ASN1_CTX) || (con != ASN1_CON)
		   || (tag != ASN1_EOC)) {
		   || (tag != ASN1_EOC)) {
		cFYI(1, "cls = %d con = %d tag = %d end = %p (%d) exit 0",
		cifs_dbg(FYI, "cls = %d con = %d tag = %d end = %p (%d) exit 0\n",
			 cls, con, tag, end, *end);
			 cls, con, tag, end, *end);
		return 0;
		return 0;
	}
	}


	/* negTokenInit */
	/* negTokenInit */
	if (asn1_header_decode(&ctx, &end, &cls, &con, &tag) == 0) {
	if (asn1_header_decode(&ctx, &end, &cls, &con, &tag) == 0) {
		cFYI(1, "Error decoding negTokenInit");
		cifs_dbg(FYI, "Error decoding negTokenInit\n");
		return 0;
		return 0;
	} else if ((cls != ASN1_UNI) || (con != ASN1_CON)
	} else if ((cls != ASN1_UNI) || (con != ASN1_CON)
		   || (tag != ASN1_SEQ)) {
		   || (tag != ASN1_SEQ)) {
		cFYI(1, "cls = %d con = %d tag = %d end = %p (%d) exit 1",
		cifs_dbg(FYI, "cls = %d con = %d tag = %d end = %p (%d) exit 1\n",
			 cls, con, tag, end, *end);
			 cls, con, tag, end, *end);
		return 0;
		return 0;
	}
	}


	/* sequence */
	/* sequence */
	if (asn1_header_decode(&ctx, &end, &cls, &con, &tag) == 0) {
	if (asn1_header_decode(&ctx, &end, &cls, &con, &tag) == 0) {
		cFYI(1, "Error decoding 2nd part of negTokenInit");
		cifs_dbg(FYI, "Error decoding 2nd part of negTokenInit\n");
		return 0;
		return 0;
	} else if ((cls != ASN1_CTX) || (con != ASN1_CON)
	} else if ((cls != ASN1_CTX) || (con != ASN1_CON)
		   || (tag != ASN1_EOC)) {
		   || (tag != ASN1_EOC)) {
		cFYI(1, "cls = %d con = %d tag = %d end = %p (%d) exit 0",
		cifs_dbg(FYI, "cls = %d con = %d tag = %d end = %p (%d) exit 0\n",
			 cls, con, tag, end, *end);
			 cls, con, tag, end, *end);
		return 0;
		return 0;
	}
	}
@@ -571,11 +571,11 @@ decode_negTokenInit(unsigned char *security_blob, int length,
	/* sequence of */
	/* sequence of */
	if (asn1_header_decode
	if (asn1_header_decode
	    (&ctx, &sequence_end, &cls, &con, &tag) == 0) {
	    (&ctx, &sequence_end, &cls, &con, &tag) == 0) {
		cFYI(1, "Error decoding 2nd part of negTokenInit");
		cifs_dbg(FYI, "Error decoding 2nd part of negTokenInit\n");
		return 0;
		return 0;
	} else if ((cls != ASN1_UNI) || (con != ASN1_CON)
	} else if ((cls != ASN1_UNI) || (con != ASN1_CON)
		   || (tag != ASN1_SEQ)) {
		   || (tag != ASN1_SEQ)) {
		cFYI(1, "cls = %d con = %d tag = %d end = %p (%d) exit 1",
		cifs_dbg(FYI, "cls = %d con = %d tag = %d end = %p (%d) exit 1\n",
			 cls, con, tag, end, *end);
			 cls, con, tag, end, *end);
		return 0;
		return 0;
	}
	}
@@ -584,15 +584,15 @@ decode_negTokenInit(unsigned char *security_blob, int length,
	while (!asn1_eoc_decode(&ctx, sequence_end)) {
	while (!asn1_eoc_decode(&ctx, sequence_end)) {
		rc = asn1_header_decode(&ctx, &end, &cls, &con, &tag);
		rc = asn1_header_decode(&ctx, &end, &cls, &con, &tag);
		if (!rc) {
		if (!rc) {
			cFYI(1, "Error decoding negTokenInit hdr exit2");
			cifs_dbg(FYI, "Error decoding negTokenInit hdr exit2\n");
			return 0;
			return 0;
		}
		}
		if ((tag == ASN1_OJI) && (con == ASN1_PRI)) {
		if ((tag == ASN1_OJI) && (con == ASN1_PRI)) {
			if (asn1_oid_decode(&ctx, end, &oid, &oidlen)) {
			if (asn1_oid_decode(&ctx, end, &oid, &oidlen)) {


				cFYI(1, "OID len = %d oid = 0x%lx 0x%lx "
				cifs_dbg(FYI, "OID len = %d oid = 0x%lx 0x%lx 0x%lx 0x%lx\n",
					"0x%lx 0x%lx", oidlen, *oid,
					 oidlen, *oid, *(oid + 1), *(oid + 2),
					*(oid + 1), *(oid + 2), *(oid + 3));
					 *(oid + 3));


				if (compare_oid(oid, oidlen, MSKRB5_OID,
				if (compare_oid(oid, oidlen, MSKRB5_OID,
						MSKRB5_OID_LEN))
						MSKRB5_OID_LEN))
@@ -610,7 +610,7 @@ decode_negTokenInit(unsigned char *security_blob, int length,
				kfree(oid);
				kfree(oid);
			}
			}
		} else {
		} else {
			cFYI(1, "Should be an oid what is going on?");
			cifs_dbg(FYI, "Should be an oid what is going on?\n");
		}
		}
	}
	}


+3 −3
Original line number Original line Diff line number Diff line
@@ -92,7 +92,7 @@ static uint16_t cifs_server_get_key(const void *cookie_netfs_data,
		break;
		break;


	default:
	default:
		cERROR(1, "Unknown network family '%d'", sa->sa_family);
		cifs_dbg(VFS, "Unknown network family '%d'\n", sa->sa_family);
		key_len = 0;
		key_len = 0;
		break;
		break;
	}
	}
@@ -152,7 +152,7 @@ static uint16_t cifs_super_get_key(const void *cookie_netfs_data, void *buffer,


	sharename = extract_sharename(tcon->treeName);
	sharename = extract_sharename(tcon->treeName);
	if (IS_ERR(sharename)) {
	if (IS_ERR(sharename)) {
		cFYI(1, "%s: couldn't extract sharename", __func__);
		cifs_dbg(FYI, "%s: couldn't extract sharename\n", __func__);
		sharename = NULL;
		sharename = NULL;
		return 0;
		return 0;
	}
	}
@@ -302,7 +302,7 @@ static void cifs_fscache_inode_now_uncached(void *cookie_netfs_data)
	pagevec_init(&pvec, 0);
	pagevec_init(&pvec, 0);
	first = 0;
	first = 0;


	cFYI(1, "%s: cifs inode 0x%p now uncached", __func__, cifsi);
	cifs_dbg(FYI, "%s: cifs inode 0x%p now uncached\n", __func__, cifsi);


	for (;;) {
	for (;;) {
		nr_pages = pagevec_lookup(&pvec,
		nr_pages = pagevec_lookup(&pvec,
+42 −25
Original line number Original line Diff line number Diff line
@@ -57,15 +57,32 @@ cifs_dump_mem(char *label, void *data, int length)
	}
	}
}
}


#ifdef CONFIG_CIFS_DEBUG
void cifs_vfs_err(const char *fmt, ...)
{
	struct va_format vaf;
	va_list args;

	va_start(args, fmt);

	vaf.fmt = fmt;
	vaf.va = &args;

	printk(KERN_ERR "CIFS VFS: %pV", &vaf);

	va_end(args);
}
#endif

void cifs_dump_detail(void *buf)
void cifs_dump_detail(void *buf)
{
{
#ifdef CONFIG_CIFS_DEBUG2
#ifdef CONFIG_CIFS_DEBUG2
	struct smb_hdr *smb = (struct smb_hdr *)buf;
	struct smb_hdr *smb = (struct smb_hdr *)buf;


	cERROR(1, "Cmd: %d Err: 0x%x Flags: 0x%x Flgs2: 0x%x Mid: %d Pid: %d",
	cifs_dbg(VFS, "Cmd: %d Err: 0x%x Flags: 0x%x Flgs2: 0x%x Mid: %d Pid: %d\n",
		 smb->Command, smb->Status.CifsError,
		 smb->Command, smb->Status.CifsError,
		 smb->Flags, smb->Flags2, smb->Mid, smb->Pid);
		 smb->Flags, smb->Flags2, smb->Mid, smb->Pid);
	cERROR(1, "smb buf %p len %u", smb, smbCalcSize(smb));
	cifs_dbg(VFS, "smb buf %p len %u\n", smb, smbCalcSize(smb));
#endif /* CONFIG_CIFS_DEBUG2 */
#endif /* CONFIG_CIFS_DEBUG2 */
}
}


@@ -78,25 +95,25 @@ void cifs_dump_mids(struct TCP_Server_Info *server)
	if (server == NULL)
	if (server == NULL)
		return;
		return;


	cERROR(1, "Dump pending requests:");
	cifs_dbg(VFS, "Dump pending requests:\n");
	spin_lock(&GlobalMid_Lock);
	spin_lock(&GlobalMid_Lock);
	list_for_each(tmp, &server->pending_mid_q) {
	list_for_each(tmp, &server->pending_mid_q) {
		mid_entry = list_entry(tmp, struct mid_q_entry, qhead);
		mid_entry = list_entry(tmp, struct mid_q_entry, qhead);
		cERROR(1, "State: %d Cmd: %d Pid: %d Cbdata: %p Mid %llu",
		cifs_dbg(VFS, "State: %d Cmd: %d Pid: %d Cbdata: %p Mid %llu\n",
			 mid_entry->mid_state,
			 mid_entry->mid_state,
			 le16_to_cpu(mid_entry->command),
			 le16_to_cpu(mid_entry->command),
			 mid_entry->pid,
			 mid_entry->pid,
			 mid_entry->callback_data,
			 mid_entry->callback_data,
			 mid_entry->mid);
			 mid_entry->mid);
#ifdef CONFIG_CIFS_STATS2
#ifdef CONFIG_CIFS_STATS2
		cERROR(1, "IsLarge: %d buf: %p time rcv: %ld now: %ld",
		cifs_dbg(VFS, "IsLarge: %d buf: %p time rcv: %ld now: %ld\n",
			 mid_entry->large_buf,
			 mid_entry->large_buf,
			 mid_entry->resp_buf,
			 mid_entry->resp_buf,
			 mid_entry->when_received,
			 mid_entry->when_received,
			 jiffies);
			 jiffies);
#endif /* STATS2 */
#endif /* STATS2 */
		cERROR(1, "IsMult: %d IsEnd: %d", mid_entry->multiRsp,
		cifs_dbg(VFS, "IsMult: %d IsEnd: %d\n",
			  mid_entry->multiEnd);
			 mid_entry->multiRsp, mid_entry->multiEnd);
		if (mid_entry->resp_buf) {
		if (mid_entry->resp_buf) {
			cifs_dump_detail(mid_entry->resp_buf);
			cifs_dump_detail(mid_entry->resp_buf);
			cifs_dump_mem("existing buf: ",
			cifs_dump_mem("existing buf: ",
@@ -603,7 +620,7 @@ static ssize_t cifs_security_flags_proc_write(struct file *file,
			global_secflags = CIFSSEC_MAX;
			global_secflags = CIFSSEC_MAX;
			return count;
			return count;
		} else if (!isdigit(c)) {
		} else if (!isdigit(c)) {
			cERROR(1, "invalid flag %c", c);
			cifs_dbg(VFS, "invalid flag %c\n", c);
			return -EINVAL;
			return -EINVAL;
		}
		}
	}
	}
@@ -611,15 +628,15 @@ static ssize_t cifs_security_flags_proc_write(struct file *file,


	flags = simple_strtoul(flags_string, NULL, 0);
	flags = simple_strtoul(flags_string, NULL, 0);


	cFYI(1, "sec flags 0x%x", flags);
	cifs_dbg(FYI, "sec flags 0x%x\n", flags);


	if (flags <= 0)  {
	if (flags <= 0)  {
		cERROR(1, "invalid security flags %s", flags_string);
		cifs_dbg(VFS, "invalid security flags %s\n", flags_string);
		return -EINVAL;
		return -EINVAL;
	}
	}


	if (flags & ~CIFSSEC_MASK) {
	if (flags & ~CIFSSEC_MASK) {
		cERROR(1, "attempt to set unsupported security flags 0x%x",
		cifs_dbg(VFS, "attempt to set unsupported security flags 0x%x\n",
			 flags & ~CIFSSEC_MASK);
			 flags & ~CIFSSEC_MASK);
		return -EINVAL;
		return -EINVAL;
	}
	}
@@ -628,9 +645,9 @@ static ssize_t cifs_security_flags_proc_write(struct file *file,
	if (global_secflags & CIFSSEC_MUST_SIGN) {
	if (global_secflags & CIFSSEC_MUST_SIGN) {
		/* requiring signing implies signing is allowed */
		/* requiring signing implies signing is allowed */
		global_secflags |= CIFSSEC_MAY_SIGN;
		global_secflags |= CIFSSEC_MAY_SIGN;
		cFYI(1, "packet signing now required");
		cifs_dbg(FYI, "packet signing now required\n");
	} else if ((global_secflags & CIFSSEC_MAY_SIGN) == 0) {
	} else if ((global_secflags & CIFSSEC_MAY_SIGN) == 0) {
		cFYI(1, "packet signing disabled");
		cifs_dbg(FYI, "packet signing disabled\n");
	}
	}
	/* BB should we turn on MAY flags for other MUST options? */
	/* BB should we turn on MAY flags for other MUST options? */
	return count;
	return count;
+23 −47
Original line number Original line Diff line number Diff line
@@ -25,18 +25,20 @@
void cifs_dump_mem(char *label, void *data, int length);
void cifs_dump_mem(char *label, void *data, int length);
void cifs_dump_detail(void *);
void cifs_dump_detail(void *);
void cifs_dump_mids(struct TCP_Server_Info *);
void cifs_dump_mids(struct TCP_Server_Info *);
#ifdef CONFIG_CIFS_DEBUG2
#define DBG2 2
#else
#define DBG2 0
#endif
extern int traceSMB;		/* flag which enables the function below */
extern int traceSMB;		/* flag which enables the function below */
void dump_smb(void *, int);
void dump_smb(void *, int);
#define CIFS_INFO	0x01
#define CIFS_INFO	0x01
#define CIFS_RC		0x02
#define CIFS_RC		0x02
#define CIFS_TIMER	0x04
#define CIFS_TIMER	0x04


#define VFS 1
#define FYI 2
extern int cifsFYI;
extern int cifsFYI;
#ifdef CONFIG_CIFS_DEBUG2
#define NOISY 4
#else
#define NOISY 0
#endif


/*
/*
 *	debug ON
 *	debug ON
@@ -44,31 +46,21 @@ extern int cifsFYI;
 */
 */
#ifdef CONFIG_CIFS_DEBUG
#ifdef CONFIG_CIFS_DEBUG


__printf(1, 2) void cifs_vfs_err(const char *fmt, ...);

/* information message: e.g., configuration, major event */
/* information message: e.g., configuration, major event */
#define cifsfyi(fmt, ...)						\
#define cifs_dbg(type, fmt, ...)					\
do {									\
do {									\
	if (cifsFYI & CIFS_INFO)					\
	if (type == FYI) {						\
		printk(KERN_DEBUG "%s: " fmt "\n",			\
		if (cifsFYI & CIFS_INFO) {				\
			printk(KERN_DEBUG "%s: " fmt,			\
			       __FILE__, ##__VA_ARGS__);		\
			       __FILE__, ##__VA_ARGS__);		\
} while (0)
		}							\

	} else if (type == VFS) {					\
#define cFYI(set, fmt, ...)						\
		cifs_vfs_err(fmt, ##__VA_ARGS__);			\
do {									\
	} else if (type == NOISY && type != 0) {			\
	if (set)							\
		printk(KERN_DEBUG fmt, ##__VA_ARGS__);			\
		cifsfyi(fmt, ##__VA_ARGS__);				\
	}								\
} while (0)

#define cifswarn(fmt, ...)						\
	printk(KERN_WARNING fmt "\n", ##__VA_ARGS__)

/* error event message: e.g., i/o error */
#define cifserror(fmt, ...)						\
	printk(KERN_ERR "CIFS VFS: " fmt "\n", ##__VA_ARGS__);		\

#define cERROR(set, fmt, ...)						\
do {									\
	if (set)							\
		cifserror(fmt, ##__VA_ARGS__);				\
} while (0)
} while (0)


/*
/*
@@ -76,27 +68,11 @@ do { \
 *	---------
 *	---------
 */
 */
#else		/* _CIFS_DEBUG */
#else		/* _CIFS_DEBUG */
#define cifsfyi(fmt, ...)						\
#define cifs_dbg(type, fmt, ...)					\
do {									\
	if (0)								\
		printk(KERN_DEBUG "%s: " fmt "\n",			\
		       __FILE__, ##__VA_ARGS__);			\
} while (0)
#define cFYI(set, fmt, ...)						\
do {									\
	if (0 && set)							\
		cifsfyi(fmt, ##__VA_ARGS__);				\
} while (0)
#define cifserror(fmt, ...)						\
do {									\
do {									\
	if (0)								\
	if (0)								\
		printk(KERN_ERR "CIFS VFS: " fmt "\n", ##__VA_ARGS__);	\
		printk(KERN_DEBUG fmt, ##__VA_ARGS__);			\
} while (0)
} while (0)
#define cERROR(set, fmt, ...)						\
#endif
do {									\
	if (0 && set)							\
		cifserror(fmt, ##__VA_ARGS__);				\
} while (0)
#endif		/* _CIFS_DEBUG */


#endif				/* _H_CIFS_DEBUG */
#endif				/* _H_CIFS_DEBUG */
+21 −20
Original line number Original line Diff line number Diff line
@@ -84,7 +84,7 @@ static char *cifs_get_share_name(const char *node_name)
	/* find server name end */
	/* find server name end */
	pSep = memchr(UNC+2, '\\', len-2);
	pSep = memchr(UNC+2, '\\', len-2);
	if (!pSep) {
	if (!pSep) {
		cERROR(1, "%s: no server name end in node name: %s",
		cifs_dbg(VFS, "%s: no server name end in node name: %s\n",
			 __func__, node_name);
			 __func__, node_name);
		kfree(UNC);
		kfree(UNC);
		return ERR_PTR(-EINVAL);
		return ERR_PTR(-EINVAL);
@@ -141,7 +141,7 @@ 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) {
		cFYI(1, "%s: Failed to resolve server part of %s to IP: %d",
		cifs_dbg(FYI, "%s: Failed to resolve server part of %s to IP: %d\n",
			 __func__, *devname, rc);
			 __func__, *devname, rc);
		goto compose_mount_options_err;
		goto compose_mount_options_err;
	}
	}
@@ -216,8 +216,8 @@ char *cifs_compose_mount_options(const char *sb_mountdata,
		strcat(mountdata, fullpath + ref->path_consumed);
		strcat(mountdata, fullpath + ref->path_consumed);
	}
	}


	/*cFYI(1, "%s: parent mountdata: %s", __func__,sb_mountdata);*/
	/*cifs_dbg(FYI, "%s: parent mountdata: %s\n", __func__, sb_mountdata);*/
	/*cFYI(1, "%s: submount mountdata: %s", __func__, mountdata );*/
	/*cifs_dbg(FYI, "%s: submount mountdata: %s\n", __func__, mountdata );*/


compose_mount_options_out:
compose_mount_options_out:
	kfree(srvIP);
	kfree(srvIP);
@@ -260,11 +260,12 @@ static struct vfsmount *cifs_dfs_do_refmount(struct cifs_sb_info *cifs_sb,


static void dump_referral(const struct dfs_info3_param *ref)
static void dump_referral(const struct dfs_info3_param *ref)
{
{
	cFYI(1, "DFS: ref path: %s", ref->path_name);
	cifs_dbg(FYI, "DFS: ref path: %s\n", ref->path_name);
	cFYI(1, "DFS: node path: %s", ref->node_name);
	cifs_dbg(FYI, "DFS: node path: %s\n", ref->node_name);
	cFYI(1, "DFS: fl: %hd, srv_type: %hd", ref->flags, ref->server_type);
	cifs_dbg(FYI, "DFS: fl: %hd, srv_type: %hd\n",
	cFYI(1, "DFS: ref_flags: %hd, path_consumed: %hd", ref->ref_flag,
		 ref->flags, ref->server_type);
				ref->path_consumed);
	cifs_dbg(FYI, "DFS: ref_flags: %hd, path_consumed: %hd\n",
		 ref->ref_flag, ref->path_consumed);
}
}


/*
/*
@@ -283,7 +284,7 @@ static struct vfsmount *cifs_dfs_do_automount(struct dentry *mntpt)
	struct vfsmount *mnt;
	struct vfsmount *mnt;
	struct tcon_link *tlink;
	struct tcon_link *tlink;


	cFYI(1, "in %s", __func__);
	cifs_dbg(FYI, "in %s\n", __func__);
	BUG_ON(IS_ROOT(mntpt));
	BUG_ON(IS_ROOT(mntpt));


	/*
	/*
@@ -320,15 +321,15 @@ static struct vfsmount *cifs_dfs_do_automount(struct dentry *mntpt)
		/* connect to a node */
		/* connect to a node */
		len = strlen(referrals[i].node_name);
		len = strlen(referrals[i].node_name);
		if (len < 2) {
		if (len < 2) {
			cERROR(1, "%s: Net Address path too short: %s",
			cifs_dbg(VFS, "%s: Net Address path too short: %s\n",
				 __func__, referrals[i].node_name);
				 __func__, referrals[i].node_name);
			mnt = ERR_PTR(-EINVAL);
			mnt = ERR_PTR(-EINVAL);
			break;
			break;
		}
		}
		mnt = cifs_dfs_do_refmount(cifs_sb,
		mnt = cifs_dfs_do_refmount(cifs_sb,
				full_path, referrals + i);
				full_path, referrals + i);
		cFYI(1, "%s: cifs_dfs_do_refmount:%s , mnt:%p", __func__,
		cifs_dbg(FYI, "%s: cifs_dfs_do_refmount:%s , mnt:%p\n",
					referrals[i].node_name, mnt);
			 __func__, referrals[i].node_name, mnt);
		if (!IS_ERR(mnt))
		if (!IS_ERR(mnt))
			goto success;
			goto success;
	}
	}
@@ -343,7 +344,7 @@ static struct vfsmount *cifs_dfs_do_automount(struct dentry *mntpt)
free_full_path:
free_full_path:
	kfree(full_path);
	kfree(full_path);
cdda_exit:
cdda_exit:
	cFYI(1, "leaving %s" , __func__);
	cifs_dbg(FYI, "leaving %s\n" , __func__);
	return mnt;
	return mnt;
}
}


@@ -354,11 +355,11 @@ struct vfsmount *cifs_dfs_d_automount(struct path *path)
{
{
	struct vfsmount *newmnt;
	struct vfsmount *newmnt;


	cFYI(1, "in %s", __func__);
	cifs_dbg(FYI, "in %s\n", __func__);


	newmnt = cifs_dfs_do_automount(path->dentry);
	newmnt = cifs_dfs_do_automount(path->dentry);
	if (IS_ERR(newmnt)) {
	if (IS_ERR(newmnt)) {
		cFYI(1, "leaving %s [automount failed]" , __func__);
		cifs_dbg(FYI, "leaving %s [automount failed]\n" , __func__);
		return newmnt;
		return newmnt;
	}
	}


@@ -366,7 +367,7 @@ struct vfsmount *cifs_dfs_d_automount(struct path *path)
	mnt_set_expiry(newmnt, &cifs_dfs_automount_list);
	mnt_set_expiry(newmnt, &cifs_dfs_automount_list);
	schedule_delayed_work(&cifs_dfs_automount_task,
	schedule_delayed_work(&cifs_dfs_automount_task,
			      cifs_dfs_mountpoint_expiry_timeout);
			      cifs_dfs_mountpoint_expiry_timeout);
	cFYI(1, "leaving %s [ok]" , __func__);
	cifs_dbg(FYI, "leaving %s [ok]\n" , __func__);
	return newmnt;
	return newmnt;
}
}


Loading