ceph: drop unused argument
authorSage Weil <sage@newdream.net>
Thu, 10 Jun 2010 19:55:52 +0000 (12:55 -0700)
committerSage Weil <sage@newdream.net>
Mon, 2 Aug 2010 03:11:39 +0000 (20:11 -0700)
Signed-off-by: Sage Weil <sage@newdream.net>
fs/ceph/caps.c
fs/ceph/mds_client.c
fs/ceph/mds_client.h

index b28915d5f40476f72cf05c9881031ec70a05941a..a5b5725931bf566a468bb23bc890fbe4decaa40a 100644 (file)
@@ -2717,7 +2717,7 @@ void ceph_handle_caps(struct ceph_mds_session *session,
                 * along for the mds (who clearly thinks we still have this
                 * cap).
                 */
-               ceph_add_cap_releases(mdsc, session, -1);
+               ceph_add_cap_releases(mdsc, session);
                ceph_send_cap_releases(mdsc, session);
                goto done;
        }
index dd440bd438a930a5dbd30cfa5e6ea63ae24f5947..26a5368e91f23d1116540bdc4c625ee88926e40c 100644 (file)
@@ -1067,15 +1067,13 @@ static int trim_caps(struct ceph_mds_client *mdsc,
  * Called under s_mutex.
  */
 int ceph_add_cap_releases(struct ceph_mds_client *mdsc,
-                         struct ceph_mds_session *session,
-                         int extra)
+                         struct ceph_mds_session *session)
 {
        struct ceph_msg *msg;
        struct ceph_mds_cap_release *head;
        int err = -ENOMEM;
+       int extra = mdsc->client->mount_args->cap_release_safety;
 
-       if (extra < 0)
-               extra = mdsc->client->mount_args->cap_release_safety;
 
        spin_lock(&session->s_cap_lock);
 
@@ -2005,7 +2003,7 @@ out_err:
        }
        mutex_unlock(&mdsc->mutex);
 
-       ceph_add_cap_releases(mdsc, req->r_session, -1);
+       ceph_add_cap_releases(mdsc, req->r_session);
        mutex_unlock(&session->s_mutex);
 
        /* kick calling process */
@@ -2715,7 +2713,7 @@ static void delayed_work(struct work_struct *work)
                        send_renew_caps(mdsc, s);
                else
                        ceph_con_keepalive(&s->s_con);
-               ceph_add_cap_releases(mdsc, s, -1);
+               ceph_add_cap_releases(mdsc, s);
                if (s->s_state == CEPH_MDS_SESSION_OPEN ||
                    s->s_state == CEPH_MDS_SESSION_HUNG)
                        ceph_send_cap_releases(mdsc, s);
index 952410c60d093e7ba5c39ed630c6283664d90c5a..e389902db13148bf3938499ca6e6ca5b10082830 100644 (file)
@@ -324,8 +324,7 @@ static inline void ceph_mdsc_put_request(struct ceph_mds_request *req)
 }
 
 extern int ceph_add_cap_releases(struct ceph_mds_client *mdsc,
-                                struct ceph_mds_session *session,
-                                int extra);
+                                struct ceph_mds_session *session);
 extern void ceph_send_cap_releases(struct ceph_mds_client *mdsc,
                                   struct ceph_mds_session *session);