diff mbox

cifs: small variable name cleanup

Message ID 20130410114300.GB21419@longonot.mountain (mailing list archive)
State New, archived
Headers show

Commit Message

Dan Carpenter April 10, 2013, 11:43 a.m. UTC
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.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Steve French April 10, 2013, 8:56 p.m. UTC | #1
merged into cifs-2.6.git for-3.10 branch

On Wed, Apr 10, 2013 at 6:43 AM, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> 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.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
> index edb2220..e3a0f81 100644
> --- a/fs/cifs/connect.c
> +++ b/fs/cifs/connect.c
> @@ -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;
diff mbox

Patch

diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index edb2220..e3a0f81 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -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;