diff options
author | Jes Sorensen <jes@sgi.com> | 2006-01-09 18:59:24 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@hera.kernel.org> | 2006-01-09 18:59:24 -0500 |
commit | 1b1dcc1b57a49136f118a0f16367256ff9994a69 (patch) | |
tree | b0b36d4f41d28c9d6514fb309d33c1a084d6309b /fs/binfmt_misc.c | |
parent | 794ee1baee1c26be40410233e6c20bceb2b03c08 (diff) |
[PATCH] mutex subsystem, semaphore to mutex: VFS, ->i_sem
This patch converts the inode semaphore to a mutex. I have tested it on
XFS and compiled as much as one can consider on an ia64. Anyway your
luck with it might be different.
Modified-by: Ingo Molnar <mingo@elte.hu>
(finished the conversion)
Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'fs/binfmt_misc.c')
-rw-r--r-- | fs/binfmt_misc.c | 12 |
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, | |||
658 | out2: | 658 | out2: |
659 | dput(dentry); | 659 | dput(dentry); |
660 | out: | 660 | out: |
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 | } |