linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lukas Czerner <lczerner@redhat.com>
To: linux-ext4@vger.kernel.org
Cc: tytso@mit.edu, amir73il@gmail.com, Lukas Czerner <lczerner@redhat.com>
Subject: [PATCH] ext4: protect bb_first_free in ext4_trim_all_free() with group lock
Date: Thu, 21 Apr 2011 12:26:36 +0200	[thread overview]
Message-ID: <1303381596-13758-1-git-send-email-lczerner@redhat.com> (raw)
In-Reply-To: <alpine.LFD.2.00.1104211135540.4399@dhcp-27-109.brq.redhat.com>

We should protect reading bd_info->bb_first_free with the group lock
because otherwise we might miss some free blocks. This is not a big deal
at all, but the change to do right thing is really simple, so lets do
that.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
---
 fs/ext4/mballoc.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 776d7a8..804232a 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -4775,11 +4775,11 @@ ext4_trim_all_free(struct super_block *sb, ext4_group_t group,
 				"information for %u", group);
 		return ret;
 	}

  reply	other threads:[~2011-04-21 10:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-18 16:32 [PATCH] ext4: ext4_trim_fs() load buddy only when it is needed Lukas Czerner
2011-04-19 19:16 ` Amir Goldstein
2011-04-21  9:36   ` Lukas Czerner
2011-04-21 10:26     ` Lukas Czerner [this message]
     [not found]       ` <20110421110120.GB11901@bitwizard.nl>
2011-04-21 11:10         ` [PATCH] ext4: protect bb_first_free in ext4_trim_all_free() with group lock Lukas Czerner
2011-05-24 22:32       ` Ted Ts'o
2011-05-24 22:18 ` [PATCH] ext4: ext4_trim_fs() load buddy only when it is needed Ted Ts'o

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=1303381596-13758-1-git-send-email-lczerner@redhat.com \
    --to=lczerner@redhat.com \
    --cc=amir73il@gmail.com \
    --cc=linux-ext4@vger.kernel.org \
    --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 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).