diff options
Diffstat (limited to 'fs/namespace.c')
| -rw-r--r-- | fs/namespace.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/namespace.c b/fs/namespace.c index 3e8fb61ad597..f0e353f5bc30 100644 --- a/fs/namespace.c +++ b/fs/namespace.c | |||
| @@ -814,7 +814,7 @@ static int graft_tree(struct vfsmount *mnt, struct nameidata *nd) | |||
| 814 | return -ENOTDIR; | 814 | return -ENOTDIR; |
| 815 | 815 | ||
| 816 | err = -ENOENT; | 816 | err = -ENOENT; |
| 817 | down(&nd->dentry->d_inode->i_sem); | 817 | mutex_lock(&nd->dentry->d_inode->i_mutex); |
| 818 | if (IS_DEADDIR(nd->dentry->d_inode)) | 818 | if (IS_DEADDIR(nd->dentry->d_inode)) |
| 819 | goto out_unlock; | 819 | goto out_unlock; |
| 820 | 820 | ||
| @@ -826,7 +826,7 @@ static int graft_tree(struct vfsmount *mnt, struct nameidata *nd) | |||
| 826 | if (IS_ROOT(nd->dentry) || !d_unhashed(nd->dentry)) | 826 | if (IS_ROOT(nd->dentry) || !d_unhashed(nd->dentry)) |
| 827 | err = attach_recursive_mnt(mnt, nd, NULL); | 827 | err = attach_recursive_mnt(mnt, nd, NULL); |
| 828 | out_unlock: | 828 | out_unlock: |
| 829 | up(&nd->dentry->d_inode->i_sem); | 829 | mutex_unlock(&nd->dentry->d_inode->i_mutex); |
| 830 | if (!err) | 830 | if (!err) |
| 831 | security_sb_post_addmount(mnt, nd); | 831 | security_sb_post_addmount(mnt, nd); |
| 832 | return err; | 832 | return err; |
| @@ -962,7 +962,7 @@ static int do_move_mount(struct nameidata *nd, char *old_name) | |||
| 962 | goto out; | 962 | goto out; |
| 963 | 963 | ||
| 964 | err = -ENOENT; | 964 | err = -ENOENT; |
| 965 | down(&nd->dentry->d_inode->i_sem); | 965 | mutex_lock(&nd->dentry->d_inode->i_mutex); |
| 966 | if (IS_DEADDIR(nd->dentry->d_inode)) | 966 | if (IS_DEADDIR(nd->dentry->d_inode)) |
| 967 | goto out1; | 967 | goto out1; |
| 968 | 968 | ||
| @@ -1004,7 +1004,7 @@ static int do_move_mount(struct nameidata *nd, char *old_name) | |||
| 1004 | list_del_init(&old_nd.mnt->mnt_expire); | 1004 | list_del_init(&old_nd.mnt->mnt_expire); |
| 1005 | spin_unlock(&vfsmount_lock); | 1005 | spin_unlock(&vfsmount_lock); |
| 1006 | out1: | 1006 | out1: |
| 1007 | up(&nd->dentry->d_inode->i_sem); | 1007 | mutex_unlock(&nd->dentry->d_inode->i_mutex); |
| 1008 | out: | 1008 | out: |
| 1009 | up_write(&namespace_sem); | 1009 | up_write(&namespace_sem); |
| 1010 | if (!err) | 1010 | if (!err) |
| @@ -1573,7 +1573,7 @@ asmlinkage long sys_pivot_root(const char __user * new_root, | |||
| 1573 | user_nd.dentry = dget(current->fs->root); | 1573 | user_nd.dentry = dget(current->fs->root); |
| 1574 | read_unlock(¤t->fs->lock); | 1574 | read_unlock(¤t->fs->lock); |
| 1575 | down_write(&namespace_sem); | 1575 | down_write(&namespace_sem); |
| 1576 | down(&old_nd.dentry->d_inode->i_sem); | 1576 | mutex_lock(&old_nd.dentry->d_inode->i_mutex); |
| 1577 | error = -EINVAL; | 1577 | error = -EINVAL; |
| 1578 | if (IS_MNT_SHARED(old_nd.mnt) || | 1578 | if (IS_MNT_SHARED(old_nd.mnt) || |
| 1579 | IS_MNT_SHARED(new_nd.mnt->mnt_parent) || | 1579 | IS_MNT_SHARED(new_nd.mnt->mnt_parent) || |
| @@ -1626,7 +1626,7 @@ asmlinkage long sys_pivot_root(const char __user * new_root, | |||
| 1626 | path_release(&root_parent); | 1626 | path_release(&root_parent); |
| 1627 | path_release(&parent_nd); | 1627 | path_release(&parent_nd); |
| 1628 | out2: | 1628 | out2: |
| 1629 | up(&old_nd.dentry->d_inode->i_sem); | 1629 | mutex_unlock(&old_nd.dentry->d_inode->i_mutex); |
| 1630 | up_write(&namespace_sem); | 1630 | up_write(&namespace_sem); |
| 1631 | path_release(&user_nd); | 1631 | path_release(&user_nd); |
| 1632 | path_release(&old_nd); | 1632 | path_release(&old_nd); |
