aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ocfs2')
-rw-r--r--fs/ocfs2/stack_user.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ocfs2/stack_user.c b/fs/ocfs2/stack_user.c
index 24e0b19c8b69..353fc35c6748 100644
--- a/fs/ocfs2/stack_user.c
+++ b/fs/ocfs2/stack_user.c
@@ -21,6 +21,7 @@
21#include <linux/fs.h> 21#include <linux/fs.h>
22#include <linux/miscdevice.h> 22#include <linux/miscdevice.h>
23#include <linux/mutex.h> 23#include <linux/mutex.h>
24#include <linux/smp_lock.h>
24#include <linux/reboot.h> 25#include <linux/reboot.h>
25#include <asm/uaccess.h> 26#include <asm/uaccess.h>
26 27
@@ -610,10 +611,12 @@ static int ocfs2_control_open(struct inode *inode, struct file *file)
610 return -ENOMEM; 611 return -ENOMEM;
611 p->op_this_node = -1; 612 p->op_this_node = -1;
612 613
614 lock_kernel();
613 mutex_lock(&ocfs2_control_lock); 615 mutex_lock(&ocfs2_control_lock);
614 file->private_data = p; 616 file->private_data = p;
615 list_add(&p->op_list, &ocfs2_control_private_list); 617 list_add(&p->op_list, &ocfs2_control_private_list);
616 mutex_unlock(&ocfs2_control_lock); 618 mutex_unlock(&ocfs2_control_lock);
619 unlock_kernel();
617 620
618 return 0; 621 return 0;
619} 622}