summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2010-10-01 14:48:13 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2010-10-01 14:48:13 +1000
commit8f73439b6dd516613a31fe040ad655ce953c96ce (patch)
tree209e8a2634ee60cbe19af54b6df7c7c04dcdbf80 /fs
parent4122a4b040e408296989cad33adbb6b2d32a9257 (diff)
parent5778067afcfd8b718ffc3744c25fdd194fc886a1 (diff)
Merge remote branch 'bkl-trivial/trivial'
Conflicts: drivers/block/ataflop.c drivers/char/pcmcia/cm4000_cs.c drivers/char/pcmcia/cm4040_cs.c drivers/mmc/card/block.c
Diffstat (limited to 'fs')
-rw-r--r--fs/hfsplus/ioctl.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/hfsplus/ioctl.c b/fs/hfsplus/ioctl.c
index ac405f099026..af7c95e6ba77 100644
--- a/fs/hfsplus/ioctl.c
+++ b/fs/hfsplus/ioctl.c
@@ -17,16 +17,17 @@
#include <linux/mount.h>
#include <linux/sched.h>
#include <linux/xattr.h>
-#include <linux/smp_lock.h>
+#include <linux/mutex.h>
#include <asm/uaccess.h>
#include "hfsplus_fs.h"
+static DEFINE_MUTEX(hfsplus_mutex);
long hfsplus_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
{
struct inode *inode = filp->f_path.dentry->d_inode;
unsigned int flags;
- lock_kernel();
+ mutex_lock(&hfsplus_mutex);
switch (cmd) {
case HFSPLUS_IOC_EXT2_GETFLAGS:
flags = 0;
@@ -41,7 +42,7 @@ long hfsplus_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
int err = 0;
err = mnt_want_write(filp->f_path.mnt);
if (err) {
- unlock_kernel();
+ mutex_unlock(&hfsplus_mutex);
return err;
}
@@ -89,11 +90,11 @@ long hfsplus_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
mark_inode_dirty(inode);
setflags_out:
mnt_drop_write(filp->f_path.mnt);
- unlock_kernel();
+ mutex_unlock(&hfsplus_mutex);
return err;
}
default:
- unlock_kernel();
+ mutex_unlock(&hfsplus_mutex);
return -ENOTTY;
}
}