aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/namei.c3
-rw-r--r--fs/open.c5
2 files changed, 3 insertions, 5 deletions
diff --git a/fs/namei.c b/fs/namei.c
index 868d0cb9d473..fe34c2b879f4 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1484,8 +1484,7 @@ static int handle_truncate(struct path *path)
1484 */ 1484 */
1485 error = locks_verify_locked(inode); 1485 error = locks_verify_locked(inode);
1486 if (!error) 1486 if (!error)
1487 error = security_path_truncate(path, 0, 1487 error = security_path_truncate(path);
1488 ATTR_MTIME|ATTR_CTIME|ATTR_OPEN);
1489 if (!error) { 1488 if (!error) {
1490 error = do_truncate(path->dentry, 0, 1489 error = do_truncate(path->dentry, 0,
1491 ATTR_MTIME|ATTR_CTIME|ATTR_OPEN, 1490 ATTR_MTIME|ATTR_CTIME|ATTR_OPEN,
diff --git a/fs/open.c b/fs/open.c
index 5463266db9e6..a54ed85209c1 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -110,7 +110,7 @@ static long do_sys_truncate(const char __user *pathname, loff_t length)
110 110
111 error = locks_verify_truncate(inode, NULL, length); 111 error = locks_verify_truncate(inode, NULL, length);
112 if (!error) 112 if (!error)
113 error = security_path_truncate(&path, length, 0); 113 error = security_path_truncate(&path);
114 if (!error) 114 if (!error)
115 error = do_truncate(path.dentry, length, 0, NULL); 115 error = do_truncate(path.dentry, length, 0, NULL);
116 116
@@ -165,8 +165,7 @@ static long do_sys_ftruncate(unsigned int fd, loff_t length, int small)
165 165
166 error = locks_verify_truncate(inode, file, length); 166 error = locks_verify_truncate(inode, file, length);
167 if (!error) 167 if (!error)
168 error = security_path_truncate(&file->f_path, length, 168 error = security_path_truncate(&file->f_path);
169 ATTR_MTIME|ATTR_CTIME);
170 if (!error) 169 if (!error)
171 error = do_truncate(dentry, length, ATTR_MTIME|ATTR_CTIME, file); 170 error = do_truncate(dentry, length, ATTR_MTIME|ATTR_CTIME, file);
172out_putf: 171out_putf: