From 3f3da526333b91c787b2388319cb16297b4d8cc3 Mon Sep 17 00:00:00 2001 From: Kinglong Mee Date: Wed, 13 Mar 2019 21:13:38 +0800 Subject: shard: fix crash caused by using null inode Change-Id: I156bf962223304e586b83a36be59a0ca74589b43 Updates: bz#1688287 Signed-off-by: Kinglong Mee --- xlators/features/shard/src/shard.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/xlators/features/shard/src/shard.c b/xlators/features/shard/src/shard.c index fa3564a4605..7a62f92f9ef 100644 --- a/xlators/features/shard/src/shard.c +++ b/xlators/features/shard/src/shard.c @@ -2004,10 +2004,9 @@ shard_truncate_last_shard(call_frame_t *frame, xlator_t *this, inode_t *inode) */ if (!inode) { gf_msg_debug(this->name, 0, - "Last shard to be truncated absent" - " in backend: %s. Directly proceeding to update " - "file size", - uuid_utoa(inode->gfid)); + "Last shard to be truncated absent in backend: %d of " + "gfid %s. Directly proceeding to update file size", + local->first_block, uuid_utoa(local->loc.inode->gfid)); shard_update_file_size(frame, this, NULL, &local->loc, shard_post_update_size_truncate_handler); return 0; -- cgit