lkml.org 
[lkml]   [2007]   [Apr]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] revoke: only fput unused files
From: Pekka Enberg <penberg@cs.helsinki.fi>

We should do fput only to files that were not used by the revoke
operation.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
---
fs/revoke.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

Index: uml-2.6/fs/revoke.c
===================================================================
--- uml-2.6.orig/fs/revoke.c 2007-04-19 17:27:11.000000000 +0300
+++ uml-2.6/fs/revoke.c 2007-04-19 17:27:40.000000000 +0300
@@ -130,7 +130,6 @@ for (fd = 0; fd < fdt->max_fds; fd++) {
}

new_filp = revoke_table_get(table);
- get_file(new_filp);

/*
* Replace original struct file pointer with a pointer to
@@ -487,7 +486,7 @@ static void free_revoke_table(struct rev
{
int i;

- for (i = 0; i < table->size; i++)
+ for (i = table->end; i < table->size; i++)
fput(table->files[i]);

kfree(table->files);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2007-04-19 16:37    [W:0.023 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site