[PATCH] ovl: update ctime when changing file attribution

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxx>
---
 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






[Index of Archives]     [Linux Filesystems Devel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux