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 4/6] udf: Replace BKL
Date: Sat, 23 Oct 2010 13:37:31 +0200 [thread overview]
Message-ID: <1287833853-4175-4-git-send-email-abogani@texware.it> (raw)
In-Reply-To: <1287833853-4175-1-git-send-email-abogani@texware.it>
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@texware.it>
---
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
next prev parent reply other threads:[~2010-10-23 11:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-23 11:37 [PATCH 1/6] udf: Replace BKL with superblock's mutex s_lock Alessio Igor Bogani
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 ` Alessio Igor Bogani [this message]
2010-10-23 11:37 ` [PATCH 5/6] " 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-4-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®