struct dentry *lower_dir_dentry;
int bstart, bend, bindex;
int err = 0;
- struct iattr attr;
int opaque;
opaque = odf_get_opaque(dentry->d_parent);
if (!err)
unionfs_copy_attr_times(dentry->d_inode);
dput(lower_dentry);
- fsstack_copy_attr_times(dir, lower_dir_dentry->d_inode);
unlock_dir(lower_dir_dentry);
if (err)
}
/*
- * we want to update mtime here, since if the file to
- * be removed was only on a rd only branch, then since
- * the mtime of that branch has not changed, so the
- * mtime of the upper file is not updated
+ * XXX: do we want to update mtime here? (since if the file to be
+ * removed was only on a rd only branch, then since the mtime of
+ * that branch has not changed, so the mtime of the upper file is
+ * not updated?)
*/
odf_purge_dir_cache(dentry->d_parent);
- attr.ia_mtime = current_kernel_time();
- attr.ia_valid = ATTR_MTIME | ATTR_MTIME_SET | ATTR_FORCE;
- err = notify_change(dentry->d_parent, &attr);
/*
* XXX: ignore this error, for now, unionfs_setattr should
if (!S_ISDIR(dentry->d_inode->i_mode))
unionfs_postcopyup_release(dentry);
d_drop(dentry);
- /*
- * if unlink/whiteout succeeded, parent dir mtime has
- * changed
- */
- unionfs_copy_attr_times(dir);
}
out:
if (!err) {
unionfs_check_dentry(dentry);
unionfs_check_inode(dir);
+ /* update parent dir times if unlink/whiteout succeeded */
+ unionfs_copy_attr_times(dir);
}
unionfs_unlock_dentry(dentry);
unionfs_read_unlock(dentry->d_sb);
struct dentry *lower_dir_dentry = NULL;
int bstart, bend, bindex;
int err = 0;
- struct iattr attr;
err = unionfs_partial_lookup(dentry);
if (err)
else
err = -EROFS;
dput(lower_dentry);
- fsstack_copy_attr_times(dir, lower_dir_dentry->d_inode);
/* propagate number of hard-links */
/* FIXME: does this belong in or out of the loop? */
}
/*
- * we want to update mtime here, since if the file to
- * be removed was only on a rd only branch, then since
- * the mtime of that branch has not changed, so the
- * mtime of the upper file is not updated
+ * XXX: do we want to update mtime here? (since if the file to be
+ * removed was only on a rd only branch, then since the mtime of
+ * that branch has not changed, so the mtime of the upper file is
+ * not updated?)
*/
odf_purge_dir_cache(dentry->d_parent);
- attr.ia_mtime = current_kernel_time();
- attr.ia_valid = ATTR_MTIME | ATTR_MTIME_SET | ATTR_FORCE;
- err = notify_change(dentry->d_parent, &attr);
/*
* XXX: ignore this error, for now, unionfs_setattr should
err = unionfs_do_rmdir(dir, dentry);
if (err)
goto out;
+ /* update parent dir times if if rmdir/whiteout succeeded above */
+ unionfs_copy_attr_times(dir);
+
/* FIXME: what if this fails? */
err = odf_remove(dentry, ODF_RMV_NOTWH);