From cae26f07b5d605bdeb04db28e4f191254bcc3fa4 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Wed, 15 Aug 2012 20:00:58 -0400 Subject: [PATCH] --- yaml --- r: 328967 b: refs/heads/master c: b9e02af0ae0783894abb576fbab45ec29aa8e7fc h: refs/heads/master i: 328965: ccfaba39a1471c0053fde844fd3454dbb0f65fde 328963: d2aa51b3dc5bd4d30d169c3dfd6dac2fc2e7cbfd 328959: 90a8d97bcfd1a0f5c20e38a86d7d245d4e225523 v: v3 --- [refs] | 2 +- trunk/fs/file.c | 14 +++++--------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/[refs] b/[refs] index 2033394c5cb9..96b7eb525aa8 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7cf4dc3c8dbfdfde163d4636f621cf99a1f63bfb +refs/heads/master: b9e02af0ae0783894abb576fbab45ec29aa8e7fc diff --git a/trunk/fs/file.c b/trunk/fs/file.c index 0be423cadb26..533fa5d56a5f 100644 --- a/trunk/fs/file.c +++ b/trunk/fs/file.c @@ -447,18 +447,14 @@ void put_files_struct(struct files_struct *files) if (atomic_dec_and_test(&files->count)) { close_files(files); - /* - * Free the fd and fdset arrays if we expanded them. - * If the fdtable was embedded, pass files for freeing - * at the end of the RCU grace period. Otherwise, - * you can free files immediately. - */ + /* not really needed, since nobody can see us */ rcu_read_lock(); fdt = files_fdtable(files); - if (fdt != &files->fdtab) - kmem_cache_free(files_cachep, files); - free_fdtable(fdt); rcu_read_unlock(); + /* free the arrays if they are not embedded */ + if (fdt != &files->fdtab) + __free_fdtable(fdt); + kmem_cache_free(files_cachep, files); } }