[PATCH 4/6] udf: Replace BKL
From: Alessio Igor Bogani
Date: Sat Oct 23 2010 - 07:38:12 EST
Replace BKL with i_mutex in udf_symlink_filler function.
This work was supported by a hardware donation from the CE Linux Forum.
Signed-off-by: Alessio Igor Bogani <abogani@xxxxxxxxxx>
---
fs/udf/symlink.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/udf/symlink.c b/fs/udf/symlink.c
index 1606478..cdf4492 100644
--- a/fs/udf/symlink.c
+++ b/fs/udf/symlink.c
@@ -27,7 +27,7 @@
#include <linux/mm.h>
#include <linux/stat.h>
#include <linux/pagemap.h>
-#include <linux/smp_lock.h>
+#include <linux/mutex.h>
#include <linux/buffer_head.h>
#include "udf_i.h"
@@ -79,8 +79,8 @@ static int udf_symlink_filler(struct file *file, struct page *page)
unsigned char *p = kmap(page);
struct udf_inode_info *iinfo;
- lock_kernel();
iinfo = UDF_I(inode);
+ mutex_lock(&inode->i_mutex);
if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_IN_ICB) {
symlink = iinfo->i_ext.i_data + iinfo->i_lenEAttr;
} else {
@@ -95,14 +95,14 @@ static int udf_symlink_filler(struct file *file, struct page *page)
udf_pc_to_char(inode->i_sb, symlink, inode->i_size, p);
brelse(bh);
- unlock_kernel();
+ mutex_unlock(&inode->i_mutex);
SetPageUptodate(page);
kunmap(page);
unlock_page(page);
return 0;
out:
- unlock_kernel();
+ mutex_unlock(&inode->i_mutex);
SetPageError(page);
kunmap(page);
unlock_page(page);
--
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/