From: John Johansen Date: Fri, 25 Jul 2014 11:01:56 +0000 (-0700) Subject: apparmor: fix update the mtime of the profile file on replacement X-Git-Tag: v3.12.70~28 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=40c541cf20d052b3dff9f68687f68ffa5ca9fdeb;p=thirdparty%2Fkernel%2Fstable.git apparmor: fix update the mtime of the profile file on replacement commit d671e890205a663429da74e1972e652bea4d73ab upstream. Signed-off-by: John Johansen Acked-by: Seth Arnold Signed-off-by: Jiri Slaby --- diff --git a/security/apparmor/apparmorfs.c b/security/apparmor/apparmorfs.c index b30489856741d..a798c75c77261 100644 --- a/security/apparmor/apparmorfs.c +++ b/security/apparmor/apparmorfs.c @@ -380,6 +380,8 @@ void __aa_fs_profile_migrate_dents(struct aa_profile *old, for (i = 0; i < AAFS_PROF_SIZEOF; i++) { new->dents[i] = old->dents[i]; + if (new->dents[i]) + new->dents[i]->d_inode->i_mtime = CURRENT_TIME; old->dents[i] = NULL; } }