linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] epoll: remove unneeded variable in reverse_path_check()
@ 2012-02-24 11:31 Dan Carpenter
  2012-02-24 14:53 ` Jason Baron
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2012-02-24 11:31 UTC (permalink / raw)
  To: Jason Baron; +Cc: Alexander Viro, linux-fsdevel, linux-kernel, kernel-janitors

We never use the length variable.

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

diff --git a/fs/eventpoll.c b/fs/eventpoll.c
index c636fc8..997a6d2 100644
--- a/fs/eventpoll.c
+++ b/fs/eventpoll.c
@@ -1042,13 +1042,11 @@ static int reverse_path_check_proc(void *priv, void *cookie, int call_nests)
  */
 static int reverse_path_check(void)
 {
-	int length = 0;
 	int error = 0;
 	struct file *current_file;
 
 	/* let's call this for all tfiles */
 	list_for_each_entry(current_file, &tfile_check_list, f_tfile_llink) {
-		length++;
 		path_count_init();
 		error = ep_call_nested(&poll_loop_ncalls, EP_MAX_NESTS,
 					reverse_path_check_proc, current_file,

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

* Re: [patch] epoll: remove unneeded variable in reverse_path_check()
  2012-02-24 11:31 [patch] epoll: remove unneeded variable in reverse_path_check() Dan Carpenter
@ 2012-02-24 14:53 ` Jason Baron
  0 siblings, 0 replies; 2+ messages in thread
From: Jason Baron @ 2012-02-24 14:53 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Alexander Viro, linux-fsdevel, linux-kernel, kernel-janitors,
	akpm

On Fri, Feb 24, 2012 at 02:31:58PM +0300, Dan Carpenter wrote:
> We never use the length variable.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/fs/eventpoll.c b/fs/eventpoll.c
> index c636fc8..997a6d2 100644
> --- a/fs/eventpoll.c
> +++ b/fs/eventpoll.c
> @@ -1042,13 +1042,11 @@ static int reverse_path_check_proc(void *priv, void *cookie, int call_nests)
>   */
>  static int reverse_path_check(void)
>  {
> -	int length = 0;
>  	int error = 0;
>  	struct file *current_file;
>  
>  	/* let's call this for all tfiles */
>  	list_for_each_entry(current_file, &tfile_check_list, f_tfile_llink) {
> -		length++;
>  		path_count_init();
>  		error = ep_call_nested(&poll_loop_ncalls, EP_MAX_NESTS,
>  					reverse_path_check_proc, current_file,

Yes, I had that in there while testing, and should have removed it.

Acked-by: Jason Baron <jbaron@redhat.com>

Thanks,

-Jason

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

end of thread, other threads:[~2012-02-24 14:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-24 11:31 [patch] epoll: remove unneeded variable in reverse_path_check() Dan Carpenter
2012-02-24 14:53 ` Jason Baron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).