summaryrefslogtreecommitdiffstats
path: root/xlators/features
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/features')
-rw-r--r--xlators/features/quota/src/quota.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/xlators/features/quota/src/quota.c b/xlators/features/quota/src/quota.c
index 80b3a2885eb..3a2c26daa50 100644
--- a/xlators/features/quota/src/quota.c
+++ b/xlators/features/quota/src/quota.c
@@ -733,6 +733,13 @@ quota_update_size (xlator_t *this, inode_t *inode, char *name, ino_t par,
parent = inode_parent (_inode, par, name);
+ if (parent == NULL) {
+ gf_log (this->name, GF_LOG_DEBUG,
+ "cannot find parent for inode (ino:%"PRId64", "
+ "gfid:%s)", _inode->ino,
+ uuid_utoa (_inode->gfid));
+ }
+
if (name != NULL) {
name = NULL;
par = 0;
@@ -741,6 +748,10 @@ quota_update_size (xlator_t *this, inode_t *inode, char *name, ino_t par,
inode_unref (_inode);
_inode = parent;
+ if (_inode == NULL) {
+ break;
+ }
+
inode_ctx_get (_inode, this, &value);
ctx = (quota_inode_ctx_t *)(unsigned long)value;
} while (1);