aboutsummaryrefslogtreecommitdiffstats
path: root/fs/namei.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/namei.c')
-rw-r--r--fs/namei.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/fs/namei.c b/fs/namei.c
index 993a65a7d570..21d85f1ac839 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -2012,10 +2012,8 @@ int vfs_link(struct dentry *old_dentry, struct inode *dir, struct dentry *new_de
2012 DQUOT_INIT(dir); 2012 DQUOT_INIT(dir);
2013 error = dir->i_op->link(old_dentry, dir, new_dentry); 2013 error = dir->i_op->link(old_dentry, dir, new_dentry);
2014 up(&old_dentry->d_inode->i_sem); 2014 up(&old_dentry->d_inode->i_sem);
2015 if (!error) { 2015 if (!error)
2016 fsnotify_create(dir, new_dentry->d_name.name); 2016 fsnotify_create(dir, new_dentry->d_name.name);
2017 security_inode_post_link(old_dentry, dir, new_dentry);
2018 }
2019 return error; 2017 return error;
2020} 2018}
2021 2019
@@ -2134,11 +2132,8 @@ static int vfs_rename_dir(struct inode *old_dir, struct dentry *old_dentry,
2134 d_rehash(new_dentry); 2132 d_rehash(new_dentry);
2135 dput(new_dentry); 2133 dput(new_dentry);
2136 } 2134 }
2137 if (!error) { 2135 if (!error)
2138 d_move(old_dentry,new_dentry); 2136 d_move(old_dentry,new_dentry);
2139 security_inode_post_rename(old_dir, old_dentry,
2140 new_dir, new_dentry);
2141 }
2142 return error; 2137 return error;
2143} 2138}
2144 2139
@@ -2164,7 +2159,6 @@ static int vfs_rename_other(struct inode *old_dir, struct dentry *old_dentry,
2164 /* The following d_move() should become unconditional */ 2159 /* The following d_move() should become unconditional */
2165 if (!(old_dir->i_sb->s_type->fs_flags & FS_ODD_RENAME)) 2160 if (!(old_dir->i_sb->s_type->fs_flags & FS_ODD_RENAME))
2166 d_move(old_dentry, new_dentry); 2161 d_move(old_dentry, new_dentry);
2167 security_inode_post_rename(old_dir, old_dentry, new_dir, new_dentry);
2168 } 2162 }
2169 if (target) 2163 if (target)
2170 up(&target->i_sem); 2164 up(&target->i_sem);