Skip to content

Commit d8991e8

Browse files
cgxu519Miklos Szeredi
authored andcommitted
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 <[email protected]> Signed-off-by: Miklos Szeredi <[email protected]>
1 parent b71759e commit d8991e8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

fs/overlayfs/inode.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,9 @@ int ovl_fileattr_set(struct user_namespace *mnt_userns,
573573
BUILD_BUG_ON(OVL_PROT_I_FLAGS_MASK & ~OVL_COPY_I_FLAGS_MASK);
574574
flags |= inode->i_flags & OVL_PROT_I_FLAGS_MASK;
575575
inode_set_flags(inode, flags, OVL_COPY_I_FLAGS_MASK);
576+
577+
/* Update ctime */
578+
ovl_copyattr(ovl_inode_real(inode), inode);
576579
}
577580
ovl_drop_write(dentry);
578581
out:

0 commit comments

Comments
 (0)