mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 13:14:07 +08:00
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:
parent
b71759ef1e
commit
d8991e8622
@ -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);
|
BUILD_BUG_ON(OVL_PROT_I_FLAGS_MASK & ~OVL_COPY_I_FLAGS_MASK);
|
||||||
flags |= inode->i_flags & OVL_PROT_I_FLAGS_MASK;
|
flags |= inode->i_flags & OVL_PROT_I_FLAGS_MASK;
|
||||||
inode_set_flags(inode, flags, OVL_COPY_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);
|
ovl_drop_write(dentry);
|
||||||
out:
|
out:
|
||||||
|
Loading…
Reference in New Issue
Block a user