Whamcloud - gitweb
LU-7936 utils: fix resource lost
[fs/lustre-release.git] / lustre / mdt / mdt_hsm_cdt_agent.c
index 9a9ce6d..4ef5f14 100644 (file)
@@ -40,6 +40,7 @@
 #include <lustre_export.h>
 #include <lustre/lustre_user.h>
 #include <lprocfs_status.h>
+#include <lustre_kernelcomm.h>
 #include "mdt_internal.h"
 
 /*
@@ -48,7 +49,7 @@
 
 /*
  * find a hsm_agent by uuid
- * lock cdt_agent_lock needs to be hold by caller
+ * lock cdt_agent_lock needs to be held by caller
  * \param cdt [IN] coordinator
  * \param uuid [IN] agent UUID
  * \retval hsm_agent pointer or NULL if not found
@@ -505,7 +506,7 @@ int mdt_hsm_coordinator_update(struct mdt_thread_info *mti,
        int      rc;
 
        ENTRY;
-       /* ask to coodinator to update request state and
+       /* ask to coordinator to update request state and
         * to record on disk the result */
        rc = mdt_hsm_update_request_state(mti, pgs, 1);
        RETURN(rc);
@@ -621,15 +622,12 @@ static int lprocfs_open_hsm_agent(struct inode *inode, struct file *file)
        int              rc;
        ENTRY;
 
-       if (LPROCFS_ENTRY_CHECK(PDE(inode)))
-               RETURN(-ENOENT);
-
        rc = seq_open(file, &mdt_hsm_agent_proc_ops);
        if (rc)
                RETURN(rc);
 
        s = file->private_data;
-       s->private = PDE(inode)->data;
+       s->private = PDE_DATA(inode);
 
        RETURN(rc);
 }