mirror of
https://git.openafs.org/openafs.git
synced 2025-01-21 08:20:16 +00:00
Windows: invalidate data version on link creation
notify the redirector that the directory data version has changed when a pioctl is used to create a symlink or mount point. FIXES 130589 Change-Id: I07e1ae130b9db8d3dd68fef892c47de008be7cd4 Reviewed-on: http://gerrit.openafs.org/6747 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com> Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
This commit is contained in:
parent
5965c5390b
commit
4ed91fe594
@ -2106,10 +2106,16 @@ cm_IoctlCreateMountPoint(struct cm_ioctl *ioctlp, struct cm_user *userp, cm_scac
|
||||
code = cm_SymLink(dscp, leaf, mpInfo, 0, &tattr, userp, reqp, NULL);
|
||||
}
|
||||
|
||||
if (code == 0 && (dscp->flags & CM_SCACHEFLAG_ANYWATCH))
|
||||
smb_NotifyChange(FILE_ACTION_ADDED,
|
||||
FILE_NOTIFY_CHANGE_DIR_NAME,
|
||||
dscp, leaf, NULL, TRUE);
|
||||
if (code == 0) {
|
||||
if (dscp->flags & CM_SCACHEFLAG_ANYWATCH)
|
||||
smb_NotifyChange(FILE_ACTION_ADDED,
|
||||
FILE_NOTIFY_CHANGE_DIR_NAME,
|
||||
dscp, leaf, NULL, TRUE);
|
||||
|
||||
if (RDR_Initialized)
|
||||
RDR_InvalidateObject(dscp->fid.cell, dscp->fid.volume, dscp->fid.vnode, dscp->fid.unique,
|
||||
dscp->fid.hash, dscp->fileType, AFS_INVALIDATE_DATA_VERSION);
|
||||
}
|
||||
|
||||
done:
|
||||
if (volp)
|
||||
@ -2175,11 +2181,18 @@ cm_IoctlSymlink(struct cm_ioctl *ioctlp, struct cm_user *userp, cm_scache_t *dsc
|
||||
code = cm_SymLink(dscp, leaf, cp, 0, &tattr, userp, reqp, NULL);
|
||||
}
|
||||
|
||||
if (code == 0 && (dscp->flags & CM_SCACHEFLAG_ANYWATCH))
|
||||
smb_NotifyChange(FILE_ACTION_ADDED,
|
||||
FILE_NOTIFY_CHANGE_FILE_NAME
|
||||
| FILE_NOTIFY_CHANGE_DIR_NAME,
|
||||
dscp, leaf, NULL, TRUE);
|
||||
if (code == 0) {
|
||||
if (dscp->flags & CM_SCACHEFLAG_ANYWATCH)
|
||||
smb_NotifyChange(FILE_ACTION_ADDED,
|
||||
FILE_NOTIFY_CHANGE_FILE_NAME
|
||||
| FILE_NOTIFY_CHANGE_DIR_NAME,
|
||||
dscp, leaf, NULL, TRUE);
|
||||
|
||||
if (RDR_Initialized)
|
||||
RDR_InvalidateObject(dscp->fid.cell, dscp->fid.volume, dscp->fid.vnode, dscp->fid.unique,
|
||||
dscp->fid.hash, dscp->fileType, AFS_INVALIDATE_DATA_VERSION);
|
||||
}
|
||||
|
||||
return code;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user