ovl: update ctime when changing fileattr

Currently we keep size, mode and times of overlay inode
as the same as upper inode, so should update ctime when
changing file attribution as well.

Signed-off-by: Chengguang Xu <cgxu519@mykernel.net>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
This commit is contained in:
Chengguang Xu 2021-03-10 10:09:25 +08:00 коммит произвёл Miklos Szeredi
Родитель b71759ef1e
Коммит d8991e8622
1 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -573,6 +573,9 @@ int ovl_fileattr_set(struct user_namespace *mnt_userns,
BUILD_BUG_ON(OVL_PROT_I_FLAGS_MASK & ~OVL_COPY_I_FLAGS_MASK);
flags |= inode->i_flags & OVL_PROT_I_FLAGS_MASK;
inode_set_flags(inode, flags, OVL_COPY_I_FLAGS_MASK);
/* Update ctime */
ovl_copyattr(ovl_inode_real(inode), inode);
}
ovl_drop_write(dentry);
out: