subsequently deleted before resend, resend processing logic
breaks trying to open the file again, should not try to open.
+Severity : Low
+Bugzilla : 19756
+Description: Rare dentry leakage on MDS on forceful shutdown and
+ replay-resends.
+Details : Sometimes on transaction errors mds_mfd_close did not release
+ mfd and dentry pointed to it. reconstruct_open did not release
+ parent dentry if no matching mfd was found and child lookup was
+ used.
+
------------------------------------------------------------------------------
tbd Sun Microsystems, Inc.
* version 1.8.1
}
dchild = mds_lookup(obd, rec->ur_name, parent, rec->ur_namelen - 1);
+ l_dput(parent);
if (IS_ERR(dchild)) {
rc = PTR_ERR(dchild);
LCONSOLE_WARN("Child "LPU64"/%u lookup error %d."
rc, obd_uuid2str(&exp->exp_client_uuid),
obd_export_nid2str(exp));
mds_export_evict(exp);
- l_dput(parent);
EXIT;
return;
}
* If we are being called from mds_disconnect() because the client has
* disappeared, then req == NULL and we do not update last_rcvd because
* there is nothing that could be recovered by the client at this stage
- * (it will not even _have_ an entry in last_rcvd anymore).
- *
- * Returns EAGAIN if the client needs to get more data and re-close. */
+ * (it will not even _have_ an entry in last_rcvd anymore). */
int mds_mfd_close(struct ptlrpc_request *req, int offset,
struct obd_device *obd, struct mds_file_data *mfd,
int unlink_orphan, struct lov_mds_md *lmm, int lmm_size,
/* If other clients have this file open for write, rc will be > 0 */
if (rc > 0)
rc = 0;
- l_dput(mfd->mfd_dentry);
- mds_mfd_put(mfd);
cleanup:
+ l_dput(mfd->mfd_dentry);
+ mds_mfd_put(mfd);
if (req != NULL && reply_body != NULL) {
rc = mds_finish_transno(mds, NULL, handle, req, rc, 0, 0);
} else if (handle) {