Messages in this thread Patch in this message | | | From | Alessio Igor Bogani <> | Subject | [PATCH 1/4] udf: Add missed protection for s_lvid_dirty | Date | Sat, 6 Nov 2010 18:47:08 +0100 |
| |
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
| |