Commit d8991e86 authored by Chengguang Xu's avatar Chengguang Xu Committed by Miklos Szeredi
Browse files

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: default avatarChengguang Xu <cgxu519@mykernel.net>
Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
parent b71759ef
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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: