lkml.org 
[lkml]   [2010]   [Nov]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/4] udf: Add missed protection for s_lvid_dirty
Date
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


\
 
 \ /
  Last update: 2010-11-06 18:51    [W:0.076 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site