All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lukas Czerner <lczerner@redhat.com>
To: linux-ext4@vger.kernel.org
Cc: tytso@mit.edu, sandeen@redhat.com, Lukas Czerner <lczerner@redhat.com>
Subject: [PATCH 2/4 v2] ext4: Remove unnecessary wait_event ext4_run_lazyinit_thread()
Date: Mon,  9 May 2011 17:57:08 +0200	[thread overview]
Message-ID: <1304956630-20384-2-git-send-email-lczerner@redhat.com> (raw)
In-Reply-To: <1304956630-20384-1-git-send-email-lczerner@redhat.com>

For some reason we have been waiting for lazyinit thread to start in the
ext4_run_lazyinit_thread() but it is not needed anymore so get rid of
it. We can also remove li_task and li_wait_task since it is not used
anymore.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
---
 fs/ext4/ext4.h  |    2 --
 fs/ext4/super.c |   10 ----------
 2 files changed, 0 insertions(+), 12 deletions(-)

diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 1e37c09..8689f97 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -1590,8 +1590,6 @@ void ext4_get_group_no_and_offset(struct super_block *sb, ext4_fsblk_t blocknr,
  */
 struct ext4_lazy_init {
 	unsigned long		li_state;
-	wait_queue_head_t	li_wait_task;
-	struct task_struct	*li_task;
 	struct list_head	li_request_list;
 	struct mutex		li_list_mtx;
 };
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index f0e4c3a..6ccf0e2 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -2754,9 +2754,6 @@ static int ext4_lazyinit_thread(void *arg)
 
 	BUG_ON(NULL == eli);
 
-	eli->li_task = current;
-	wake_up(&eli->li_wait_task);
-
 cont_thread:
 	while (true) {
 		next_wakeup = MAX_JIFFY_OFFSET;
@@ -2819,9 +2816,6 @@ exit_thread:
 		goto cont_thread;
 	}
 	mutex_unlock(&eli->li_list_mtx);
-	eli->li_task = NULL;
-	wake_up(&eli->li_wait_task);
-
 	kfree(ext4_li_info);
 	ext4_li_info = NULL;
 	mutex_unlock(&ext4_li_mtx);
@@ -2858,8 +2852,6 @@ static int ext4_run_lazyinit_thread(void)
 		return err;
 	}
 	ext4_li_info->li_state |= EXT4_LAZYINIT_RUNNING;

  reply	other threads:[~2011-05-09 15:57 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-09 15:57 [PATCH 1/4 v2] ext4: Use schedule_timeout_interruptible() for waiting in lazyinit thread Lukas Czerner
2011-05-09 15:57 ` Lukas Czerner [this message]
2011-05-19 19:37   ` [PATCH 2/4 v2] ext4: Remove unnecessary wait_event ext4_run_lazyinit_thread() Eric Sandeen
2011-05-20  9:09     ` Lukas Czerner
2011-05-09 15:57 ` [PATCH 3/4] ext4: fix init_itable=n to work as expected for n=0 Lukas Czerner
2011-05-19 19:59   ` Eric Sandeen
2011-05-20  9:21     ` Lukas Czerner
2011-05-09 15:57 ` [PATCH 4/4] ext4: fix possible use-after-free ext4_remove_li_request() Lukas Czerner
2011-05-19 20:05   ` Eric Sandeen
2011-05-20  9:27     ` Lukas Czerner
2011-05-20 16:03       ` Ted Ts'o
2011-05-20 16:12         ` Eric Sandeen
2011-05-20 17:47           ` Ted Ts'o
2011-05-20 17:49             ` Eric Sandeen
2011-05-20 16:16         ` Lukas Czerner
2011-05-20 17:39           ` Ted Ts'o
2011-05-20 17:42             ` Ted Ts'o
2011-05-19 19:30 ` [PATCH 1/4 v2] ext4: Use schedule_timeout_interruptible() for waiting in lazyinit thread Eric Sandeen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1304956630-20384-2-git-send-email-lczerner@redhat.com \
    --to=lczerner@redhat.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=sandeen@redhat.com \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.