mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
ovl: copy up times
Copy up mtime and ctime to overlay inode after times in real object are modified. Be careful not to dirty cachelines when not necessary. This is in preparation for moving overlay functionality out of the VFS. This patch shouldn't have any observable effect. Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
This commit is contained in:
parent
f182536684
commit
d9854c87f0
4 changed files with 37 additions and 9 deletions
|
@ -333,7 +333,7 @@ void ovl_inode_update(struct inode *inode, struct dentry *upperdentry)
|
|||
}
|
||||
}
|
||||
|
||||
void ovl_dentry_version_inc(struct dentry *dentry, bool impurity)
|
||||
static void ovl_dentry_version_inc(struct dentry *dentry, bool impurity)
|
||||
{
|
||||
struct inode *inode = d_inode(dentry);
|
||||
|
||||
|
@ -348,6 +348,14 @@ void ovl_dentry_version_inc(struct dentry *dentry, bool impurity)
|
|||
OVL_I(inode)->version++;
|
||||
}
|
||||
|
||||
void ovl_dir_modified(struct dentry *dentry, bool impurity)
|
||||
{
|
||||
/* Copy mtime/ctime */
|
||||
ovl_copyattr(d_inode(ovl_dentry_upper(dentry)), d_inode(dentry));
|
||||
|
||||
ovl_dentry_version_inc(dentry, impurity);
|
||||
}
|
||||
|
||||
u64 ovl_dentry_version_get(struct dentry *dentry)
|
||||
{
|
||||
struct inode *inode = d_inode(dentry);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue