From 929440fba486b480dacb605234d46d7570d911f7 Mon Sep 17 00:00:00 2001
From: adilger <adilger>
Date: Wed, 17 Dec 2003 19:48:16 +0000
Subject: [PATCH] We can never hit the end of mds_finish_open() with a non-zero
 error code because we exit early on error, so the mds_destroy_mfd() is bogus.
  I left RETURN(rc) in case things change in the future though.

We don't use request_body() anywhere inside mds_put_write_access(), but
since all of that code is just commented out I didn't do a real cleanup.
Just a bogus compiler warning fixed.
---
 lustre/mds/mds_open.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lustre/mds/mds_open.c b/lustre/mds/mds_open.c
index d57978bb97..e5711c2752 100644
--- a/lustre/mds/mds_open.c
+++ b/lustre/mds/mds_open.c
@@ -587,7 +587,7 @@ static int mds_finish_open(struct ptlrpc_request *req, struct dentry *dchild,
         struct obd_device *obd = req->rq_export->exp_obd;
         struct mds_file_data *mfd = NULL;
         obd_id *ids = NULL; /* object IDs created */
-        int rc;
+        int rc = 0;
         ENTRY;
 
         /* atomically create objects if necessary */
@@ -630,8 +630,8 @@ static int mds_finish_open(struct ptlrpc_request *req, struct dentry *dchild,
                 mds_lov_update_objids(obd, ids);
                 OBD_FREE(ids, sizeof(*ids) * mds->mds_lov_desc.ld_tgt_count);
         }
-        if (rc)
-                mds_mfd_destroy(mfd);
+        //if (rc)
+        //        mds_mfd_destroy(mfd);
         RETURN(rc);
 }
 
@@ -982,7 +982,7 @@ int mds_mfd_close(struct ptlrpc_request *req, struct obd_device *obd,
         struct mds_obd *mds = &obd->u.mds;
         struct inode *pending_dir = mds->mds_pending_dir->d_inode;
         void *handle = NULL;
-        struct mds_body *request_body, *reply_body;
+        struct mds_body *request_body = NULL, *reply_body;
         struct dentry_params dp;
         ENTRY;
 
-- 
GitLab