aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-10-10 23:16:43 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-10-10 23:16:43 -0400
commit101105b1717f536ca741f940033996302d4ef191 (patch)
tree12ab41ae1b1b66105e9fa2ea763356d2be7e8b34 /security
parent35ff96dfd3c9aaa921b3e8dcac76b7697f2dcec0 (diff)
parent3873691e5ab34fa26948643d038a2b98c4437298 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull more vfs updates from Al Viro: ">rename2() work from Miklos + current_time() from Deepa" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fs: Replace current_fs_time() with current_time() fs: Replace CURRENT_TIME_SEC with current_time() for inode timestamps fs: Replace CURRENT_TIME with current_time() for inode timestamps fs: proc: Delete inode time initializations in proc_alloc_inode() vfs: Add current_time() api vfs: add note about i_op->rename changes to porting fs: rename "rename2" i_op to "rename" vfs: remove unused i_op->rename fs: make remaining filesystems use .rename2 libfs: support RENAME_NOREPLACE in simple_rename() fs: support RENAME_NOREPLACE for local filesystems ncpfs: fix unused variable warning
Diffstat (limited to 'security')
-rw-r--r--security/apparmor/apparmorfs.c2
-rw-r--r--security/inode.c2
-rw-r--r--security/selinux/selinuxfs.c2
-rw-r--r--security/tomoyo/realpath.c4
4 files changed, 5 insertions, 5 deletions
diff --git a/security/apparmor/apparmorfs.c b/security/apparmor/apparmorfs.c
index 729e595119ed..5923d5665209 100644
--- a/security/apparmor/apparmorfs.c
+++ b/security/apparmor/apparmorfs.c
@@ -381,7 +381,7 @@ void __aa_fs_profile_migrate_dents(struct aa_profile *old,
381 for (i = 0; i < AAFS_PROF_SIZEOF; i++) { 381 for (i = 0; i < AAFS_PROF_SIZEOF; i++) {
382 new->dents[i] = old->dents[i]; 382 new->dents[i] = old->dents[i];
383 if (new->dents[i]) 383 if (new->dents[i])
384 new->dents[i]->d_inode->i_mtime = CURRENT_TIME; 384 new->dents[i]->d_inode->i_mtime = current_time(new->dents[i]->d_inode);
385 old->dents[i] = NULL; 385 old->dents[i] = NULL;
386 } 386 }
387} 387}
diff --git a/security/inode.c b/security/inode.c
index acc3e9c8d5a7..c83db05c15ab 100644
--- a/security/inode.c
+++ b/security/inode.c
@@ -117,7 +117,7 @@ struct dentry *securityfs_create_file(const char *name, umode_t mode,
117 117
118 inode->i_ino = get_next_ino(); 118 inode->i_ino = get_next_ino();
119 inode->i_mode = mode; 119 inode->i_mode = mode;
120 inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; 120 inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
121 inode->i_private = data; 121 inode->i_private = data;
122 if (is_dir) { 122 if (is_dir) {
123 inode->i_op = &simple_dir_inode_operations; 123 inode->i_op = &simple_dir_inode_operations;
diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c
index 0765c5b053b5..72c145dd799f 100644
--- a/security/selinux/selinuxfs.c
+++ b/security/selinux/selinuxfs.c
@@ -1089,7 +1089,7 @@ static struct inode *sel_make_inode(struct super_block *sb, int mode)
1089 1089
1090 if (ret) { 1090 if (ret) {
1091 ret->i_mode = mode; 1091 ret->i_mode = mode;
1092 ret->i_atime = ret->i_mtime = ret->i_ctime = CURRENT_TIME; 1092 ret->i_atime = ret->i_mtime = ret->i_ctime = current_time(ret);
1093 } 1093 }
1094 return ret; 1094 return ret;
1095} 1095}
diff --git a/security/tomoyo/realpath.c b/security/tomoyo/realpath.c
index 5077f1968841..a97b275ca3af 100644
--- a/security/tomoyo/realpath.c
+++ b/security/tomoyo/realpath.c
@@ -173,7 +173,7 @@ static char *tomoyo_get_local_path(struct dentry *dentry, char * const buffer,
173 * Use filesystem name if filesystem does not support rename() 173 * Use filesystem name if filesystem does not support rename()
174 * operation. 174 * operation.
175 */ 175 */
176 if (!inode->i_op->rename && !inode->i_op->rename2) 176 if (!inode->i_op->rename)
177 goto prepend_filesystem_name; 177 goto prepend_filesystem_name;
178 } 178 }
179 /* Prepend device name. */ 179 /* Prepend device name. */
@@ -283,7 +283,7 @@ char *tomoyo_realpath_from_path(const struct path *path)
283 * or dentry without vfsmount. 283 * or dentry without vfsmount.
284 */ 284 */
285 if (!path->mnt || 285 if (!path->mnt ||
286 (!inode->i_op->rename && !inode->i_op->rename2)) 286 (!inode->i_op->rename))
287 pos = tomoyo_get_local_path(path->dentry, buf, 287 pos = tomoyo_get_local_path(path->dentry, buf,
288 buf_len - 1); 288 buf_len - 1);
289 /* Get absolute name for the rest. */ 289 /* Get absolute name for the rest. */