aboutsummaryrefslogtreecommitdiffstats
path: root/fs/binfmt_misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/binfmt_misc.c')
-rw-r--r--fs/binfmt_misc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c
index 2568eb41cb3a..9ccc7d8275b8 100644
--- a/fs/binfmt_misc.c
+++ b/fs/binfmt_misc.c
@@ -588,11 +588,11 @@ static ssize_t bm_entry_write(struct file *file, const char __user *buffer,
588 case 2: set_bit(Enabled, &e->flags); 588 case 2: set_bit(Enabled, &e->flags);
589 break; 589 break;
590 case 3: root = dget(file->f_vfsmnt->mnt_sb->s_root); 590 case 3: root = dget(file->f_vfsmnt->mnt_sb->s_root);
591 down(&root->d_inode->i_sem); 591 mutex_lock(&root->d_inode->i_mutex);
592 592
593 kill_node(e); 593 kill_node(e);
594 594
595 up(&root->d_inode->i_sem); 595 mutex_unlock(&root->d_inode->i_mutex);
596 dput(root); 596 dput(root);
597 break; 597 break;
598 default: return res; 598 default: return res;
@@ -622,7 +622,7 @@ static ssize_t bm_register_write(struct file *file, const char __user *buffer,
622 return PTR_ERR(e); 622 return PTR_ERR(e);
623 623
624 root = dget(sb->s_root); 624 root = dget(sb->s_root);
625 down(&root->d_inode->i_sem); 625 mutex_lock(&root->d_inode->i_mutex);
626 dentry = lookup_one_len(e->name, root, strlen(e->name)); 626 dentry = lookup_one_len(e->name, root, strlen(e->name));
627 err = PTR_ERR(dentry); 627 err = PTR_ERR(dentry);
628 if (IS_ERR(dentry)) 628 if (IS_ERR(dentry))
@@ -658,7 +658,7 @@ static ssize_t bm_register_write(struct file *file, const char __user *buffer,
658out2: 658out2:
659 dput(dentry); 659 dput(dentry);
660out: 660out:
661 up(&root->d_inode->i_sem); 661 mutex_unlock(&root->d_inode->i_mutex);
662 dput(root); 662 dput(root);
663 663
664 if (err) { 664 if (err) {
@@ -703,12 +703,12 @@ static ssize_t bm_status_write(struct file * file, const char __user * buffer,
703 case 1: enabled = 0; break; 703 case 1: enabled = 0; break;
704 case 2: enabled = 1; break; 704 case 2: enabled = 1; break;
705 case 3: root = dget(file->f_vfsmnt->mnt_sb->s_root); 705 case 3: root = dget(file->f_vfsmnt->mnt_sb->s_root);
706 down(&root->d_inode->i_sem); 706 mutex_lock(&root->d_inode->i_mutex);
707 707
708 while (!list_empty(&entries)) 708 while (!list_empty(&entries))
709 kill_node(list_entry(entries.next, Node, list)); 709 kill_node(list_entry(entries.next, Node, list));
710 710
711 up(&root->d_inode->i_sem); 711 mutex_unlock(&root->d_inode->i_mutex);
712 dput(root); 712 dput(root);
713 default: return res; 713 default: return res;
714 } 714 }