]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - fs/ceph/osd_client.c
ceph: whitespace cleanup
[net-next-2.6.git] / fs / ceph / osd_client.c
index d25b4add85b4135249c77cbffc71bb2010170df5..bed6391e52c7109c966d5e642e472c665bd7d1f5 100644 (file)
@@ -862,12 +862,12 @@ static void handle_reply(struct ceph_osd_client *osdc, struct ceph_msg *msg,
        if (req->r_callback)
                req->r_callback(req, msg);
        else
-               complete(&req->r_completion);
+               complete_all(&req->r_completion);
 
        if (flags & CEPH_OSD_FLAG_ONDISK) {
                if (req->r_safe_callback)
                        req->r_safe_callback(req, msg);
-               complete(&req->r_safe_completion);  /* fsync waiter */
+               complete_all(&req->r_safe_completion);  /* fsync waiter */
        }
 
 done:
@@ -1083,7 +1083,7 @@ done:
        if (newmap)
                kick_requests(osdc, NULL);
        up_read(&osdc->map_sem);
-       wake_up(&osdc->client->auth_wq);
+       wake_up_all(&osdc->client->auth_wq);
        return;
 
 bad:
@@ -1276,8 +1276,6 @@ int ceph_osdc_readpages(struct ceph_osd_client *osdc,
 
        /* it may be a short read due to an object boundary */
        req->r_pages = pages;
-       num_pages = calc_pages_for(off, *plen);
-       req->r_num_pages = num_pages;
 
        dout("readpages  final extent is %llu~%llu (%d pages)\n",
             off, *plen, req->r_num_pages);
@@ -1319,7 +1317,6 @@ int ceph_osdc_writepages(struct ceph_osd_client *osdc, struct ceph_vino vino,
 
        /* it may be a short write due to an object boundary */
        req->r_pages = pages;
-       req->r_num_pages = calc_pages_for(off, len);
        dout("writepages %llu~%llu (%d pages)\n", off, len,
             req->r_num_pages);
 
@@ -1344,7 +1341,7 @@ static void dispatch(struct ceph_connection *con, struct ceph_msg *msg)
        int type = le16_to_cpu(msg->hdr.type);
 
        if (!osd)
-               return;
+               goto out;
        osdc = osd->o_osdc;
 
        switch (type) {
@@ -1359,6 +1356,7 @@ static void dispatch(struct ceph_connection *con, struct ceph_msg *msg)
                pr_err("received unknown message type %d %s\n", type,
                       ceph_msg_type_name(type));
        }
+out:
        ceph_msg_put(msg);
 }
 
@@ -1475,8 +1473,8 @@ static void put_osd_con(struct ceph_connection *con)
  * authentication
  */
 static int get_authorizer(struct ceph_connection *con,
-                         void **buf, int *len, int *proto,
-                         void **reply_buf, int *reply_len, int force_new)
+                         void **buf, int *len, int *proto,
+                         void **reply_buf, int *reply_len, int force_new)
 {
        struct ceph_osd *o = con->private;
        struct ceph_osd_client *osdc = o->o_osdc;
@@ -1496,7 +1494,7 @@ static int get_authorizer(struct ceph_connection *con,
                        &o->o_authorizer_reply_buf,
                        &o->o_authorizer_reply_buf_len);
                if (ret)
-               return ret;
+                       return ret;
        }
 
        *proto = ac->protocol;