Skip to contentSkip to conversation

cifs: small variable name cleanup

PATCH Applied Dan Carpenter 2 participants 2 messages Apr 10, 2013 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cifs: small variable name cleanup

server and ses->server are the same, but it's a little bit ugly that we lock &ses->server->srv_mutex and unlock &server->srv_mutex. It causes a false positive in Smatch about inconsistent locking.

fs/cifs/connect.c +1 -1
index edb2220..e3a0f81 100644
@@ -3826,7 +3826,7 @@ cifs_setup_session(const unsigned int xid, struct cifs_ses *ses,
 	if (rc) {
 		cifs_dbg(VFS, "Send error in SessSetup = %d\n", rc);
 	} else {
-		mutex_lock(&ses->server->srv_mutex);
+		mutex_lock(&server->srv_mutex);
 		if (!server->session_estab) {
 			server->session_key.response = ses->auth_key.response;
 			server->session_key.len = ses->auth_key.len;

A message that is not in the archive (sent off-list or not yet received): 20130410114300.GB21419-dZEljifmRObu9KfB+GxooP8+0UxHXcjY@public.gmane.org

Applied
#2 lore raw

merged into cifs-2.6.git for-3.10 branch

Quoted 19 lines · Dan Carpenter

server and ses->server are the same, but it's a little bit ugly that we lock &ses->server->srv_mutex and unlock &server->srv_mutex. It causes a false positive in Smatch about inconsistent locking.

fs/cifs/connect.c +1 -1
index edb2220..e3a0f81 100644
@@ -3826,7 +3826,7 @@ cifs_setup_session(const unsigned int xid, struct cifs_ses *ses,
        if (rc) {
                cifs_dbg(VFS, "Send error in SessSetup = %d\n", rc);
        } else {
-               mutex_lock(&ses->server->srv_mutex);
+               mutex_lock(&server->srv_mutex);
                if (!server->session_estab) {
                        server->session_key.response = ses->auth_key.response;
                        server->session_key.len = ses->auth_key.len;
Signature · 3 lines
Thanks,

Steve