summaryrefslogtreecommitdiffstats
path: root/xlators/features/upcall/src/upcall-internal.c
diff options
context:
space:
mode:
authorPoornima G <pgurusid@redhat.com>2017-06-02 10:05:33 +0530
committerNiels de Vos <ndevos@redhat.com>2017-06-09 11:30:31 +0000
commit149db390fd89beee1e8a3d946d4224ba2a9b4711 (patch)
treea6b32b5441ec06b3dca2b472c107641f60d9d735 /xlators/features/upcall/src/upcall-internal.c
parent68f2192df570b5ee615d440c2e0c88d49a75a34f (diff)
upcall: Update the access time in missing cases
Issue: In fops like rename, link, unlink etc, the parent dirrs' client access time was not being updated. And in fops like create, link, symlink etc. the new file/dirs' client access time was not updated. Solution: Update the client access time for both parent and new entry. Change-Id: Id9f63583216ae857f6251dca15797ac66fa85430 BUG: 1458127 Signed-off-by: Poornima G <pgurusid@redhat.com> Reviewed-on: https://review.gluster.org/17450 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com>
Diffstat (limited to 'xlators/features/upcall/src/upcall-internal.c')
-rw-r--r--xlators/features/upcall/src/upcall-internal.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/xlators/features/upcall/src/upcall-internal.c b/xlators/features/upcall/src/upcall-internal.c
index f290ca11de8..285141d251b 100644
--- a/xlators/features/upcall/src/upcall-internal.c
+++ b/xlators/features/upcall/src/upcall-internal.c
@@ -541,9 +541,7 @@ upcall_cache_invalidate (call_frame_t *frame, xlator_t *this, client_t *client,
return;
}
- up_inode_ctx = ((upcall_local_t *)frame->local)->upcall_inode_ctx;
-
- if (!up_inode_ctx)
+ if (inode)
up_inode_ctx = upcall_inode_ctx_get (inode, this);
if (!up_inode_ctx) {
@@ -558,7 +556,7 @@ upcall_cache_invalidate (call_frame_t *frame, xlator_t *this, client_t *client,
* invalid till it gets linked to inode table. Read gfid from
* the stat returned in such cases.
*/
- if (gf_uuid_is_null (up_inode_ctx->gfid)) {
+ if (gf_uuid_is_null (up_inode_ctx->gfid) && stbuf) {
/* That means inode must have been invalid when this inode_ctx
* is created. Copy the gfid value from stbuf instead.
*/