* [PATCH] ovl: update ctime when changing file attribution
@ 2021-03-10 2:09 Chengguang Xu
2021-07-21 13:11 ` Miklos Szeredi
0 siblings, 1 reply; 2+ messages in thread
From: Chengguang Xu @ 2021-03-10 2:09 UTC (permalink / raw)
To: miklos; +Cc: linux-unionfs, Chengguang Xu
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>
---
fs/overlayfs/file.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/overlayfs/file.c b/fs/overlayfs/file.c
index dbfb35fb0ff7..49b73a2e92a7 100644
--- a/fs/overlayfs/file.c
+++ b/fs/overlayfs/file.c
@@ -546,6 +546,8 @@ static long ovl_ioctl_set_flags(struct file *file, unsigned int cmd,
ret = ovl_real_ioctl(file, cmd, arg);
ovl_copyflags(ovl_inode_real(inode), inode);
+ /* Update ctime */
+ ovl_copyattr(ovl_inode_real(inode), inode);
unlock:
inode_unlock(inode);
--
2.27.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ovl: update ctime when changing file attribution
2021-03-10 2:09 [PATCH] ovl: update ctime when changing file attribution Chengguang Xu
@ 2021-07-21 13:11 ` Miklos Szeredi
0 siblings, 0 replies; 2+ messages in thread
From: Miklos Szeredi @ 2021-07-21 13:11 UTC (permalink / raw)
To: Chengguang Xu; +Cc: overlayfs
On Wed, 10 Mar 2021 at 03:09, Chengguang Xu <cgxu519@mykernel.net> wrote:
>
> 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.
Updated and pushed.
Thanks,
Miklos
>
> Signed-off-by: Chengguang Xu <cgxu519@mykernel.net>
> ---
> fs/overlayfs/file.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/fs/overlayfs/file.c b/fs/overlayfs/file.c
> index dbfb35fb0ff7..49b73a2e92a7 100644
> --- a/fs/overlayfs/file.c
> +++ b/fs/overlayfs/file.c
> @@ -546,6 +546,8 @@ static long ovl_ioctl_set_flags(struct file *file, unsigned int cmd,
> ret = ovl_real_ioctl(file, cmd, arg);
>
> ovl_copyflags(ovl_inode_real(inode), inode);
> + /* Update ctime */
> + ovl_copyattr(ovl_inode_real(inode), inode);
> unlock:
> inode_unlock(inode);
>
> --
> 2.27.0
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-07-21 13:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-10 2:09 [PATCH] ovl: update ctime when changing file attribution Chengguang Xu
2021-07-21 13:11 ` Miklos Szeredi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).