From: Alessio Igor Bogani <abogani@texware.it>
To: Jan Kara <jack@suse.cz>, Arnd Bergmann <arnd@arndb.de>
Cc: Christoph Hellwig <hch@infradead.org>,
Tim Bird <tim.bird@am.sony.com>,
LKML <linux-kernel@vger.kernel.org>,
Alessio Igor Bogani <abogani@texware.it>
Subject: [PATCH 1/4] udf: Add missed protection for s_lvid_dirty
Date: Sat, 6 Nov 2010 18:47:08 +0100 [thread overview]
Message-ID: <1289065631-2256-1-git-send-email-abogani@texware.it> (raw)
As reported in udf_sb.h the udf_sb_infoi's structure member s_lvid_dirty should
be protected by s_alloc_mutex. Added that mutex on a couple of places where it
miss.
This work was supported by a hardware donation from the CE Linux Forum.
Signed-off-by: Alessio Igor Bogani <abogani@texware.it>
---
fs/udf/super.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/fs/udf/super.c b/fs/udf/super.c
index 4a5c7c6..c05834e 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -1789,7 +1789,9 @@ static void udf_open_lvid(struct super_block *sb)
lvid->descTag.tagChecksum = udf_tag_checksum(&lvid->descTag);
mark_buffer_dirty(bh);
+ mutex_lock(&sbi->s_alloc_mutex);
sbi->s_lvid_dirty = 0;
+ mutex_unlock(&sbi->s_alloc_mutex);
}
static void udf_close_lvid(struct super_block *sb)
@@ -1821,7 +1823,9 @@ static void udf_close_lvid(struct super_block *sb)
lvid->descTag.tagChecksum = udf_tag_checksum(&lvid->descTag);
mark_buffer_dirty(bh);
+ mutex_lock(&sbi->s_alloc_mutex);
sbi->s_lvid_dirty = 0;
+ mutex_unlock(&sbi->s_alloc_mutex);
}
static void udf_sb_free_bitmap(struct udf_bitmap *bitmap)
--
1.7.0.4
next reply other threads:[~2010-11-06 17:47 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-06 17:47 Alessio Igor Bogani [this message]
2010-11-06 17:47 ` [PATCH 2/4] udf: Remove unnecessary bkl usages Alessio Igor Bogani
2010-11-06 18:06 ` Christoph Hellwig
2010-11-06 17:47 ` [PATCH 3/4] udf: Replace bkl with a mutex for protect udf_inode_info struct Alessio Igor Bogani
2010-11-06 18:10 ` Christoph Hellwig
2010-11-06 17:47 ` [PATCH 4/4] udf: Replace bkl with a mutex for protect udf_sb_info struct Alessio Igor Bogani
2010-11-06 18:16 ` Christoph Hellwig
2010-11-06 18:05 ` [PATCH 1/4] udf: Add missed protection for s_lvid_dirty Christoph Hellwig
2010-11-07 14:14 ` Jan Kara
2010-11-07 14:27 ` Christoph Hellwig
2010-11-07 15:06 ` Jan Kara
2010-11-15 22:46 ` Arnd Bergmann
2010-11-16 0:43 ` Jan Kara
2010-11-16 13:03 ` Alessio Igor Bogani
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=1289065631-2256-1-git-send-email-abogani@texware.it \
--to=abogani@texware.it \
--cc=arnd@arndb.de \
--cc=hch@infradead.org \
--cc=jack@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=tim.bird@am.sony.com \
/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