소스 검색

dlm: remove unused variable in *dlm_lowcomms_get_buffer()

The variable users is initialized but never used
otherwise, so remove the unused variable.

dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: David Teigland <teigland@redhat.com>
Wei Yongjun 13 년 전
부모
커밋
eeee2b5fe1
1개의 변경된 파일2개의 추가작업 그리고 3개의 파일을 삭제
  1. 2 3
      fs/dlm/lowcomms.c

+ 2 - 3
fs/dlm/lowcomms.c

@@ -1385,7 +1385,6 @@ void *dlm_lowcomms_get_buffer(int nodeid, int len, gfp_t allocation, char **ppc)
 	struct connection *con;
 	struct connection *con;
 	struct writequeue_entry *e;
 	struct writequeue_entry *e;
 	int offset = 0;
 	int offset = 0;
-	int users = 0;
 
 
 	con = nodeid2con(nodeid, allocation);
 	con = nodeid2con(nodeid, allocation);
 	if (!con)
 	if (!con)
@@ -1399,7 +1398,7 @@ void *dlm_lowcomms_get_buffer(int nodeid, int len, gfp_t allocation, char **ppc)
 	} else {
 	} else {
 		offset = e->end;
 		offset = e->end;
 		e->end += len;
 		e->end += len;
-		users = e->users++;
+		e->users++;
 	}
 	}
 	spin_unlock(&con->writequeue_lock);
 	spin_unlock(&con->writequeue_lock);
 
 
@@ -1414,7 +1413,7 @@ void *dlm_lowcomms_get_buffer(int nodeid, int len, gfp_t allocation, char **ppc)
 		spin_lock(&con->writequeue_lock);
 		spin_lock(&con->writequeue_lock);
 		offset = e->end;
 		offset = e->end;
 		e->end += len;
 		e->end += len;
-		users = e->users++;
+		e->users++;
 		list_add_tail(&e->list, &con->writequeue);
 		list_add_tail(&e->list, &con->writequeue);
 		spin_unlock(&con->writequeue_lock);
 		spin_unlock(&con->writequeue_lock);
 		goto got_one;
 		goto got_one;