diff options
author | Kinglong Mee <kinglongmee@gmail.com> | 2019-03-13 21:13:38 +0800 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2019-03-14 18:07:02 +0000 |
commit | 3f3da526333b91c787b2388319cb16297b4d8cc3 (patch) | |
tree | c52a848ab71b6790e6213f75302d9a2429cdf879 /xlators | |
parent | 63159cdb5374f458d7d2bffec24d4720ffc96d6c (diff) |
shard: fix crash caused by using null inode
Change-Id: I156bf962223304e586b83a36be59a0ca74589b43
Updates: bz#1688287
Signed-off-by: Kinglong Mee <mijinlong@open-fs.com>
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/features/shard/src/shard.c | 7 |
1 files 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; |