aboutsummaryrefslogtreecommitdiffstats
path: root/fs/open.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/open.c')
-rw-r--r--fs/open.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/open.c b/fs/open.c
index ca9981c4a658..0d515d161974 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -210,6 +210,9 @@ int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs,
210 newattrs.ia_valid |= ATTR_FILE; 210 newattrs.ia_valid |= ATTR_FILE;
211 } 211 }
212 212
213 /* Remove suid/sgid on truncate too */
214 newattrs.ia_valid |= should_remove_suid(dentry);
215
213 mutex_lock(&dentry->d_inode->i_mutex); 216 mutex_lock(&dentry->d_inode->i_mutex);
214 err = notify_change(dentry, &newattrs); 217 err = notify_change(dentry, &newattrs);
215 mutex_unlock(&dentry->d_inode->i_mutex); 218 mutex_unlock(&dentry->d_inode->i_mutex);