aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/connect.c
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2008-01-25 05:12:41 -0500
committerSteve French <sfrench@us.ibm.com>2008-01-25 05:12:41 -0500
commit366781c19635d861f43ff5e03388a3873ec912d9 (patch)
treebeef581849a76dd7b1c1e365c19314409f2189fb /fs/cifs/connect.c
parent6d5ae0deb1641bf615eafd8fef64218e10cb2fd0 (diff)
[CIFS] DFS build fixes
Also includes a few minor changes suggested by Christoph Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r--fs/cifs/connect.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index db3746c891b5..65d0ba72e78f 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * fs/cifs/connect.c 2 * fs/cifs/connect.c
3 * 3 *
4 * Copyright (C) International Business Machines Corp., 2002,2007 4 * Copyright (C) International Business Machines Corp., 2002,2008
5 * Author(s): Steve French (sfrench@us.ibm.com) 5 * Author(s): Steve French (sfrench@us.ibm.com)
6 * 6 *
7 * This library is free software; you can redistribute it and/or modify 7 * This library is free software; you can redistribute it and/or modify
@@ -1410,7 +1410,7 @@ connect_to_dfs_path(int xid, struct cifsSesInfo *pSesInfo,
1410 const char *old_path, const struct nls_table *nls_codepage, 1410 const char *old_path, const struct nls_table *nls_codepage,
1411 int remap) 1411 int remap)
1412{ 1412{
1413 unsigned char *referrals = NULL; 1413 struct dfs_info3_param *referrals = NULL;
1414 unsigned int num_referrals; 1414 unsigned int num_referrals;
1415 int rc = 0; 1415 int rc = 0;
1416 1416
@@ -1429,12 +1429,14 @@ connect_to_dfs_path(int xid, struct cifsSesInfo *pSesInfo,
1429int 1429int
1430get_dfs_path(int xid, struct cifsSesInfo *pSesInfo, const char *old_path, 1430get_dfs_path(int xid, struct cifsSesInfo *pSesInfo, const char *old_path,
1431 const struct nls_table *nls_codepage, unsigned int *pnum_referrals, 1431 const struct nls_table *nls_codepage, unsigned int *pnum_referrals,
1432 unsigned char **preferrals, int remap) 1432 struct dfs_info3_param **preferrals, int remap)
1433{ 1433{
1434 char *temp_unc; 1434 char *temp_unc;
1435 int rc = 0; 1435 int rc = 0;
1436 unsigned char *targetUNCs;
1436 1437
1437 *pnum_referrals = 0; 1438 *pnum_referrals = 0;
1439 *preferrals = NULL;
1438 1440
1439 if (pSesInfo->ipc_tid == 0) { 1441 if (pSesInfo->ipc_tid == 0) {
1440 temp_unc = kmalloc(2 /* for slashes */ + 1442 temp_unc = kmalloc(2 /* for slashes */ +
@@ -1454,8 +1456,10 @@ get_dfs_path(int xid, struct cifsSesInfo *pSesInfo, const char *old_path,
1454 kfree(temp_unc); 1456 kfree(temp_unc);
1455 } 1457 }
1456 if (rc == 0) 1458 if (rc == 0)
1457 rc = CIFSGetDFSRefer(xid, pSesInfo, old_path, preferrals, 1459 rc = CIFSGetDFSRefer(xid, pSesInfo, old_path, &targetUNCs,
1458 pnum_referrals, nls_codepage, remap); 1460 pnum_referrals, nls_codepage, remap);
1461 /* BB map targetUNCs to dfs_info3 structures, here or
1462 in CIFSGetDFSRefer BB */
1459 1463
1460 return rc; 1464 return rc;
1461} 1465}