Whamcloud - gitweb
mds_fid2locked_dentry(): kill unused parameters
authornikita <nikita>
Fri, 31 Mar 2006 09:44:44 +0000 (09:44 +0000)
committernikita <nikita>
Fri, 31 Mar 2006 09:44:44 +0000 (09:44 +0000)
lustre/include/linux/lustre_mds.h
lustre/mds/handler.c
lustre/mds/mds_open.c
lustre/mds/mds_reint.c
lustre/mds/mds_xattr.c

index d7e523b..eba9531 100644 (file)
@@ -101,7 +101,7 @@ int mds_reint_rec(struct mds_update_record *r, int offset,
 struct dentry *mds_fid2locked_dentry(struct obd_device *obd, struct ll_fid *fid,
                                      struct vfsmount **mnt, int lock_mode,
                                      struct lustre_handle *lockh,
-                                     char *name, int namelen, __u64 lockpart);
+                                     __u64 lockpart);
 struct dentry *mds_fid2dentry(struct mds_obd *mds, struct ll_fid *fid,
                               struct vfsmount **mnt);
 int mds_update_server_data(struct obd_device *, int force_sync);
@@ -141,7 +141,7 @@ int mdc_enqueue(struct obd_export *exp,
 /* mdc/mdc_request.c */
 int mdc_init_ea_size(struct obd_export *mdc_exp, struct obd_export *lov_exp);
 
-int mdc_req2lustre_md(struct ptlrpc_request *req, int offset, 
+int mdc_req2lustre_md(struct ptlrpc_request *req, int offset,
                       struct obd_export *exp, struct lustre_md *md);
 void mdc_free_lustre_md(struct obd_export *exp, struct lustre_md *md);
 
index cb5995b..8312d22 100644 (file)
@@ -165,7 +165,7 @@ static int mds_sendpage(struct ptlrpc_request *req, struct file *file,
 struct dentry *mds_fid2locked_dentry(struct obd_device *obd, struct ll_fid *fid,
                                      struct vfsmount **mnt, int lock_mode,
                                      struct lustre_handle *lockh,
-                                     char *name, int namelen, __u64 lockpart)
+                                     __u64 lockpart)
 {
         struct mds_obd *mds = &obd->u.mds;
         struct dentry *de = mds_fid2dentry(mds, fid, mnt), *retval = de;
@@ -869,7 +869,6 @@ static int mds_getattr_name(int offset, struct ptlrpc_request *req,
                         /* For revalidate by fid we always take UPDATE lock */
                         dchild = mds_fid2locked_dentry(obd, &body->fid2, NULL,
                                                        LCK_CR, child_lockh,
-                                                       NULL, 0,
                                                        MDS_INODELOCK_UPDATE);
                         LASSERT(dchild);
                         if (IS_ERR(dchild))
index f78d348..4586573 100644 (file)
@@ -307,7 +307,7 @@ cleanup_dentry:
 static int mds_create_objects(struct ptlrpc_request *req, int offset,
                               struct mds_update_record *rec,
                               struct mds_obd *mds, struct obd_device *obd,
-                              struct dentry *dchild, void **handle, 
+                              struct dentry *dchild, void **handle,
                               obd_id **ids)
 {
         struct inode *inode = dchild->d_inode;
@@ -363,7 +363,7 @@ static int mds_create_objects(struct ptlrpc_request *req, int offset,
                 lmm_buf = lustre_msg_buf(req->rq_repmsg, offset, lmm_size);
                 if (!lmm_buf) {
                         if (!rc) rc = -ENOMEM;
-                } else { 
+                } else {
                         memcpy(lmm_buf, lmm, lmm_size);
                 }
                 if (rc)
@@ -482,7 +482,7 @@ static int mds_create_objects(struct ptlrpc_request *req, int offset,
         lmm_buf = lustre_msg_buf(req->rq_repmsg, offset, lmm_size);
         if (!lmm_buf) {
                 if (!rc) rc = -ENOMEM;
-        } else { 
+        } else {
                 memcpy(lmm_buf, lmm, lmm_size);
         }
         obd_free_diskmd(mds->mds_osc_exp, &lmm);
@@ -615,11 +615,11 @@ static void reconstruct_open(struct mds_update_record *rec, int offset,
          * Now that exp_outstanding_reply is a list, it's just using mfd != NULL
          * to detect a re-open */
         if (mfd == NULL) {
-                if (rec->ur_flags & MDS_OPEN_JOIN_FILE) { 
-                        rc = mds_join_file(rec, req, dchild, NULL); 
-                        if (rc) 
-                                GOTO(out_dput, rc); 
-                } 
+                if (rec->ur_flags & MDS_OPEN_JOIN_FILE) {
+                        rc = mds_join_file(rec, req, dchild, NULL);
+                        if (rc)
+                                GOTO(out_dput, rc);
+                }
                 mntget(mds->mds_vfsmnt);
                 CERROR("Re-opened file \n");
                 mfd = mds_dentry_open(dchild, mds->mds_vfsmnt,
@@ -697,14 +697,14 @@ static int mds_finish_open(struct ptlrpc_request *req, struct dentry *dchild,
                         up(&dchild->d_inode->i_sem);
                         RETURN(-EEXIST);
                 }
-                if (rec->ur_flags & MDS_OPEN_JOIN_FILE) { 
+                if (rec->ur_flags & MDS_OPEN_JOIN_FILE) {
                         up(&dchild->d_inode->i_sem);
-                        rc = mds_join_file(rec, req, dchild, lockh); 
+                        rc = mds_join_file(rec, req, dchild, lockh);
                         if (rc)
                                 RETURN(rc);
                         down(&dchild->d_inode->i_sem);
-                } 
-                if (!(body->valid & OBD_MD_FLEASIZE) && 
+                }
+                if (!(body->valid & OBD_MD_FLEASIZE) &&
                     !(body->valid & OBD_MD_FLMODEASIZE)) {
                         /* no EA: create objects */
                         rc = mds_create_objects(req, 2, rec, mds, obd,
@@ -931,9 +931,7 @@ int mds_open(struct mds_update_record *rec, int offset,
         if (rec->ur_flags & (MDS_OPEN_CREAT | MDS_OPEN_JOIN_FILE))
                 parent_mode = LCK_EX;
         dparent = mds_fid2locked_dentry(obd, rec->ur_fid1, NULL, parent_mode,
-                                        &parent_lockh, rec->ur_name,
-                                        rec->ur_namelen - 1,
-                                        MDS_INODELOCK_UPDATE);
+                                        &parent_lockh, MDS_INODELOCK_UPDATE);
         if (IS_ERR(dparent)) {
                 rc = PTR_ERR(dparent);
                 if (rc != -ENOENT) {
index 6d62bf3..4e4c2ce 100644 (file)
@@ -74,7 +74,7 @@ static void mds_cancel_cookies_cb(struct obd_device *obd, __u64 transno,
         CDEBUG(D_HA, "cancelling %d cookies\n",
                (int)(mlcd->mlcd_cookielen / sizeof(*mlcd->mlcd_cookies)));
 
-        rc = obd_unpackmd(obd->u.mds.mds_osc_exp, &lsm, mlcd->mlcd_lmm, 
+        rc = obd_unpackmd(obd->u.mds.mds_osc_exp, &lsm, mlcd->mlcd_lmm,
                           mlcd->mlcd_eadatalen);
         if (rc < 0) {
                 CERROR("bad LSM cancelling %d log cookies: rc %d\n",
@@ -495,7 +495,7 @@ static int mds_reint_setattr(struct mds_update_record *rec, int offset,
                         lockpart |= MDS_INODELOCK_LOOKUP;
 
                 de = mds_fid2locked_dentry(obd, rec->ur_fid1, NULL, LCK_EX,
-                                           &lockh, NULL, 0, lockpart);
+                                           &lockh, lockpart);
                 if (IS_ERR(de))
                         GOTO(cleanup, rc = PTR_ERR(de));
                 locked = 1;
@@ -553,7 +553,7 @@ static int mds_reint_setattr(struct mds_update_record *rec, int offset,
                 rc = fsfilt_setattr(obd, de, handle, &rec->ur_iattr, 0);
                 /* journal chown/chgrp in llog, just like unlink */
                 if (rc == 0 && lmm_size){
-                        cookie_size = mds_get_cookie_size(obd, lmm); 
+                        cookie_size = mds_get_cookie_size(obd, lmm);
                         OBD_ALLOC(logcookies, cookie_size);
                         if (logcookies == NULL)
                                 GOTO(cleanup, rc = -ENOMEM);
@@ -735,7 +735,6 @@ static int mds_reint_create(struct mds_update_record *rec, int offset,
                 GOTO(cleanup, rc = -ESTALE);
 
         dparent = mds_fid2locked_dentry(obd, rec->ur_fid1, NULL, LCK_EX, &lockh,
-                                        rec->ur_name, rec->ur_namelen - 1,
                                         MDS_INODELOCK_UPDATE);
         if (IS_ERR(dparent)) {
                 rc = PTR_ERR(dparent);
@@ -1041,13 +1040,13 @@ int enqueue_ordered_locks(struct obd_device *obd, struct ldlm_res_id *p1_res_id,
 
 int enqueue_4ordered_locks(struct obd_device *obd,struct ldlm_res_id *p1_res_id,
                            struct lustre_handle *p1_lockh, int p1_lock_mode,
-                           ldlm_policy_data_t *p1_policy, 
+                           ldlm_policy_data_t *p1_policy,
                            struct ldlm_res_id *p2_res_id,
                            struct lustre_handle *p2_lockh, int p2_lock_mode,
-                           ldlm_policy_data_t *p2_policy, 
+                           ldlm_policy_data_t *p2_policy,
                            struct ldlm_res_id *c1_res_id,
                            struct lustre_handle *c1_lockh, int c1_lock_mode,
-                           ldlm_policy_data_t *c1_policy, 
+                           ldlm_policy_data_t *c1_policy,
                            struct ldlm_res_id *c2_res_id,
                            struct lustre_handle *c2_lockh, int c2_lock_mode,
                            ldlm_policy_data_t *c2_policy)
@@ -1419,7 +1418,7 @@ out_dput:
 int mds_get_cookie_size(struct obd_device *obd, struct lov_mds_md *lmm)
 {
         int count = le32_to_cpu(lmm->lmm_stripe_count);
-        int real_csize = count * sizeof(struct llog_cookie); 
+        int real_csize = count * sizeof(struct llog_cookie);
         return real_csize;
 }
 
@@ -1439,10 +1438,10 @@ void mds_shrink_reply(struct obd_device *obd, struct ptlrpc_request *req,
 
         CDEBUG(D_INFO, "Shrink to md_size %d cookie_size %d \n", md_size,
                cookie_size);
+
         lustre_shrink_reply(req, 1, md_size, 1);
-        
-        lustre_shrink_reply(req, md_size? 2:1, cookie_size, 0); 
+
+        lustre_shrink_reply(req, md_size? 2:1, cookie_size, 0);
 }
 
 static int mds_reint_unlink(struct mds_update_record *rec, int offset,
@@ -1473,9 +1472,9 @@ static int mds_reint_unlink(struct mds_update_record *rec, int offset,
 
         rc = mds_get_parent_child_locked(obd, mds, rec->ur_fid1,
                                          &parent_lockh, &dparent, LCK_EX,
-                                         MDS_INODELOCK_UPDATE, 
+                                         MDS_INODELOCK_UPDATE,
                                          rec->ur_name, rec->ur_namelen,
-                                         &child_lockh, &dchild, LCK_EX, 
+                                         &child_lockh, &dchild, LCK_EX,
                                          MDS_INODELOCK_FULL);
         if (rc)
                 GOTO(cleanup, rc);
index d37fa65..4d50f3d 100644 (file)
@@ -226,7 +226,7 @@ int mds_setxattr_internal(struct ptlrpc_request *req, struct mds_body *body)
         lockpart = MDS_INODELOCK_UPDATE;
 
         de = mds_fid2locked_dentry(obd, &body->fid1, NULL, LCK_EX,
-                                   &lockh, NULL, 0, lockpart);
+                                   &lockh, lockpart);
         if (IS_ERR(de))
                 GOTO(out, rc = PTR_ERR(de));