Fix a leaked reference count on odf_root when trying to connect
disconnected dentries in __get_parent
Signed-off-by: Rachita Kothiyal <rachita@fsl.cs.sunysb.edu>
__odf_dstack_push(&stack, d);
if (!is_anon(d)) {
d = d->d_parent;
- if (d != odf_root)
- dget(d);
+ dget(d);
} else {
/*
* if the odf dentry is disconnected we get its
}
d = d_parent;
}
+ /*
+ * We dont push odf root on stack, but the code above has
+ * already incremented its reference count. Drop it here.
+ */
+ if (d == odf_root)
+ dput(d);
} while (d != odf_root);
/*