From: Alessio Igor Bogani <abogani@texware.it>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Tim Bird <tim.bird@am.sony.com>,
LKML <linux-kernel@vger.kernel.org>,
Alessio Igor Bogani <abogani@texware.it>
Subject: [PATCH 1/6] udf: Replace BKL with superblock's mutex s_lock
Date: Sat, 23 Oct 2010 13:37:28 +0200 [thread overview]
Message-ID: <1287833853-4175-1-git-send-email-abogani@texware.it> (raw)
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 | 26 +++++++++++++-------------
1 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/fs/udf/super.c b/fs/udf/super.c
index 76f3d6d..60b5179 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -48,7 +48,7 @@
#include <linux/stat.h>
#include <linux/cdrom.h>
#include <linux/nls.h>
-#include <linux/smp_lock.h>
+#include <linux/mutex.h>
#include <linux/buffer_head.h>
#include <linux/vfs.h>
#include <linux/vmalloc.h>
@@ -568,7 +568,7 @@ static int udf_remount_fs(struct super_block *sb, int *flags, char *options)
if (!udf_parse_options(options, &uopt, true))
return -EINVAL;
- lock_kernel();
+ mutex_lock(&sb->s_lock);
sbi->s_flags = uopt.flags;
sbi->s_uid = uopt.uid;
sbi->s_gid = uopt.gid;
@@ -591,7 +591,7 @@ static int udf_remount_fs(struct super_block *sb, int *flags, char *options)
udf_open_lvid(sb);
out_unlock:
- unlock_kernel();
+ mutex_unlock(&sb->s_lock);
return error;
}
@@ -1880,7 +1880,7 @@ static int udf_fill_super(struct super_block *sb, void *options, int silent)
struct kernel_lb_addr rootdir, fileset;
struct udf_sb_info *sbi;
- lock_kernel();
+ mutex_lock(&sb->s_lock);
uopt.flags = (1 << UDF_FLAG_USE_AD_IN_ICB) | (1 << UDF_FLAG_STRICT);
uopt.uid = -1;
@@ -1891,7 +1891,7 @@ static int udf_fill_super(struct super_block *sb, void *options, int silent)
sbi = kzalloc(sizeof(struct udf_sb_info), GFP_KERNEL);
if (!sbi) {
- unlock_kernel();
+ mutex_unlock(&sb->s_lock);
return -ENOMEM;
}
@@ -2039,7 +2039,7 @@ static int udf_fill_super(struct super_block *sb, void *options, int silent)
goto error_out;
}
sb->s_maxbytes = MAX_LFS_FILESIZE;
- unlock_kernel();
+ mutex_unlock(&sb->s_lock);
return 0;
error_out:
@@ -2060,7 +2060,7 @@ error_out:
kfree(sbi);
sb->s_fs_info = NULL;
- unlock_kernel();
+ mutex_unlock(&sb->s_lock);
return -EINVAL;
}
@@ -2099,7 +2099,7 @@ static void udf_put_super(struct super_block *sb)
sbi = UDF_SB(sb);
- lock_kernel();
+ mutex_lock(&sb->s_lock);
if (sbi->s_vat_inode)
iput(sbi->s_vat_inode);
@@ -2117,7 +2117,7 @@ static void udf_put_super(struct super_block *sb)
kfree(sb->s_fs_info);
sb->s_fs_info = NULL;
- unlock_kernel();
+ mutex_unlock(&sb->s_lock);
}
static int udf_sync_fs(struct super_block *sb, int wait)
@@ -2180,7 +2180,7 @@ static unsigned int udf_count_free_bitmap(struct super_block *sb,
uint16_t ident;
struct spaceBitmapDesc *bm;
- lock_kernel();
+ mutex_lock(&sb->s_lock);
loc.logicalBlockNum = bitmap->s_extPosition;
loc.partitionReferenceNum = UDF_SB(sb)->s_partition;
@@ -2220,7 +2220,7 @@ static unsigned int udf_count_free_bitmap(struct super_block *sb,
brelse(bh);
out:
- unlock_kernel();
+ mutex_unlock(&sb->s_lock);
return accum;
}
@@ -2234,7 +2234,7 @@ static unsigned int udf_count_free_table(struct super_block *sb,
int8_t etype;
struct extent_position epos;
- lock_kernel();
+ mutex_lock(&sb->s_lock);
epos.block = UDF_I(table)->i_location;
epos.offset = sizeof(struct unallocSpaceEntry);
@@ -2245,7 +2245,7 @@ static unsigned int udf_count_free_table(struct super_block *sb,
brelse(epos.bh);
- unlock_kernel();
+ mutex_unlock(&sb->s_lock);
return accum;
}
--
1.7.0.4
next reply other threads:[~2010-10-23 11:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-23 11:37 Alessio Igor Bogani [this message]
2010-10-23 11:37 ` [PATCH 2/6] udf: Remove BKL Alessio Igor Bogani
2010-10-23 11:37 ` [PATCH 3/6] " Alessio Igor Bogani
2010-10-23 11:37 ` [PATCH 4/6] udf: Replace BKL Alessio Igor Bogani
2010-10-23 11:37 ` [PATCH 5/6] udf: Remove BKL Alessio Igor Bogani
2010-10-23 11:37 ` [PATCH 6/6] udf: Replace BKL Alessio Igor Bogani
2010-10-23 11:46 ` [PATCH 1/6] udf: Replace BKL with superblock's mutex s_lock Christoph Hellwig
2010-10-23 11:53 ` Arnd Bergmann
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=1287833853-4175-1-git-send-email-abogani@texware.it \
--to=abogani@texware.it \
--cc=arnd@arndb.de \
--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
all inboxes | Powered by JetHome®