diff options
Diffstat (limited to 'fs/namei.c')
-rw-r--r-- | fs/namei.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/namei.c b/fs/namei.c index 00df735fb509..83c843b3fea3 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
@@ -2718,8 +2718,12 @@ static int do_rename(int olddfd, const char *oldname, | |||
2718 | if (new_dentry == trap) | 2718 | if (new_dentry == trap) |
2719 | goto exit5; | 2719 | goto exit5; |
2720 | 2720 | ||
2721 | error = mnt_want_write(oldnd.path.mnt); | ||
2722 | if (error) | ||
2723 | goto exit5; | ||
2721 | error = vfs_rename(old_dir->d_inode, old_dentry, | 2724 | error = vfs_rename(old_dir->d_inode, old_dentry, |
2722 | new_dir->d_inode, new_dentry); | 2725 | new_dir->d_inode, new_dentry); |
2726 | mnt_drop_write(oldnd.path.mnt); | ||
2723 | exit5: | 2727 | exit5: |
2724 | dput(new_dentry); | 2728 | dput(new_dentry); |
2725 | exit4: | 2729 | exit4: |