Linux-Next discussions
 help / color / mirror / Atom feed
* linux-next: manual merge of the cifs tree
@ 2008-12-03  2:51 Stephen Rothwell
  2008-12-03  3:40 ` Steve French
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Rothwell @ 2008-12-03  2:51 UTC (permalink / raw)
  To: Steve French, linux-cifs-client
  Cc: linux-next, Jeff Layton, Harvey Harrison, David S. Miller

Hi Steve,

Today's linux-next merge of the cifs tree got a conflict in
fs/cifs/connect.c between commit be859405487324ed548f1ba11dc949b8230ab991
("fs: replace NIPQUAD()") from the net tree and commits
c14eef12edfa4b495fe9f6e81571759fe720db1d ("cifs: account for IPv6 in
ses->serverName and clean up netbios name handling") and
6f694429f03ea9b9d2e253fdad2fc3b4cb801195 ("cifs: move allocation of new
TCP_Server_Info into separate function") from the cifs tree.

I fixed it up (see below) and can carry the fix as necessary.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

diff --cc fs/cifs/connect.c
index 204bd13,3519420..0000000
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@@ -2228,8 -2269,12 +2269,12 @@@ cifs_mount(struct super_block *sb, stru
  
  		/* new SMB session uses our srvTcp ref */
  		pSesInfo->server = srvTcp;
- 		sprintf(pSesInfo->serverName, "%pI4",
- 			&sin_server->sin_addr.s_addr);
+ 		if (srvTcp->addr.sockAddr6.sin6_family == AF_INET6)
 -			sprintf(pSesInfo->serverName, NIP6_FMT,
 -				NIP6(srvTcp->addr.sockAddr6.sin6_addr));
++			sprintf(pSesInfo->serverName, "%pI6",
++				&srvTcp->addr.sockAddr6.sin6_addr);
+ 		else
 -			sprintf(pSesInfo->serverName, NIPQUAD_FMT,
 -				NIPQUAD(srvTcp->addr.sockAddr.sin_addr.s_addr));
++			sprintf(pSesInfo->serverName, "%pI4",
++				&srvTcp->addr.sockAddr.sin_addr.s_addr);
  
  		write_lock(&cifs_tcp_ses_lock);
  		list_add(&pSesInfo->smb_ses_list, &srvTcp->smb_ses_list);

^ permalink raw reply	[flat|nested] 4+ messages in thread
* linux-next: manual merge of the cifs tree
@ 2008-11-17  2:42 Stephen Rothwell
  2008-11-19  2:32 ` Stephen Rothwell
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Rothwell @ 2008-11-17  2:42 UTC (permalink / raw)
  To: Steve French, linux-cifs-client; +Cc: linux-next, Harvey Harrison, Jeff Layton

Hi Steve,

Today's linux-next merge of the cifs tree got a conflict in
fs/cifs/connect.c between commit be859405487324ed548f1ba11dc949b8230ab991
("fs: replace NIPQUAD()") from the net tree and commit
14fbf50d695207754daeb96270b3027a3821121f ("cifs: reinstate sharing of SMB
sessions sans races") from the cifs tree.

I have fixed it up (see below) and can carry it as necessary.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

diff --cc fs/cifs/connect.c
index 2df8e6d,a3dc0d7..0000000
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@@ -2078,43 -2176,44 +2176,44 @@@ cifs_mount(struct super_block *sb, stru
  	} else if (!rc) {
  		cFYI(1, ("Existing smb sess not found"));
  		pSesInfo = sesInfoAlloc();
- 		if (pSesInfo == NULL)
+ 		if (pSesInfo == NULL) {
  			rc = -ENOMEM;
- 		else {
- 			pSesInfo->server = srvTcp;
- 			sprintf(pSesInfo->serverName, "%pI4",
- 				&sin_server.sin_addr.s_addr);
- 		}
+ 			goto mount_fail_check;
+ 		}
+ 
+ 		/* new SMB session uses our srvTcp ref */
+ 		pSesInfo->server = srvTcp;
 -		sprintf(pSesInfo->serverName, "%u.%u.%u.%u",
 -			NIPQUAD(sin_server->sin_addr.s_addr));
++		sprintf(pSesInfo->serverName, "%pI4",
++			&sin_server->sin_addr.s_addr);
+ 
+ 		write_lock(&cifs_tcp_ses_lock);
+ 		list_add(&pSesInfo->smb_ses_list, &srvTcp->smb_ses_list);
+ 		write_unlock(&cifs_tcp_ses_lock);
+ 
+ 		/* volume_info.password freed at unmount */
+ 		if (volume_info.password) {
+ 			pSesInfo->password = volume_info.password;
+ 			/* set to NULL to prevent freeing on exit */
+ 			volume_info.password = NULL;
+ 		}
+ 		if (volume_info.username)
+ 			strncpy(pSesInfo->userName, volume_info.username,
+ 				MAX_USERNAME_SIZE);
+ 		if (volume_info.domainname) {
+ 			int len = strlen(volume_info.domainname);
+ 			pSesInfo->domainName = kmalloc(len + 1, GFP_KERNEL);
+ 			if (pSesInfo->domainName)
+ 				strcpy(pSesInfo->domainName,
+ 					volume_info.domainname);
+ 		}
+ 		pSesInfo->linux_uid = volume_info.linux_uid;
+ 		pSesInfo->overrideSecFlg = volume_info.secFlg;
+ 		down(&pSesInfo->sesSem);
  
- 		if (!rc) {
- 			/* volume_info.password freed at unmount */
- 			if (volume_info.password) {
- 				pSesInfo->password = volume_info.password;
- 				/* set to NULL to prevent freeing on exit */
- 				volume_info.password = NULL;
- 			}
- 			if (volume_info.username)
- 				strncpy(pSesInfo->userName,
- 					volume_info.username,
- 					MAX_USERNAME_SIZE);
- 			if (volume_info.domainname) {
- 				int len = strlen(volume_info.domainname);
- 				pSesInfo->domainName =
- 					kmalloc(len + 1, GFP_KERNEL);
- 				if (pSesInfo->domainName)
- 					strcpy(pSesInfo->domainName,
- 						volume_info.domainname);
- 			}
- 			pSesInfo->linux_uid = volume_info.linux_uid;
- 			pSesInfo->overrideSecFlg = volume_info.secFlg;
- 			down(&pSesInfo->sesSem);
- 			/* BB FIXME need to pass vol->secFlgs BB */
- 			rc = cifs_setup_session(xid, pSesInfo,
- 						cifs_sb->local_nls);
- 			up(&pSesInfo->sesSem);
- 			if (!rc)
- 				atomic_inc(&srvTcp->socketUseCount);
- 		}
+ 		/* BB FIXME need to pass vol->secFlgs BB */
+ 		rc = cifs_setup_session(xid, pSesInfo,
+ 					cifs_sb->local_nls);
+ 		up(&pSesInfo->sesSem);
  	}
  
  	/* search for existing tcon to this server share */

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-12-03  3:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-03  2:51 linux-next: manual merge of the cifs tree Stephen Rothwell
2008-12-03  3:40 ` Steve French
  -- strict thread matches above, loose matches on Subject: below --
2008-11-17  2:42 Stephen Rothwell
2008-11-19  2:32 ` Stephen Rothwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox