diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-13 13:29:21 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-13 13:29:21 -0500 |
commit | 1a52bb0b686844021597d190e562ab55d1210104 (patch) | |
tree | 7edf13509869a6a7f1f488a679f15ff6c3057c54 /net | |
parent | 8638094e956a47dbb9a25166705a91e9a0981d52 (diff) | |
parent | 83eb26af0db71f2dfe551405c55d982288fa6178 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
ceph: ensure prealloc_blob is in place when removing xattr
rbd: initialize snap_rwsem in rbd_add()
ceph: enable/disable dentry complete flags via mount option
vfs: export symbol d_find_any_alias()
ceph: always initialize the dentry in open_root_dentry()
libceph: remove useless return value for osd_client __send_request()
ceph: avoid iput() while holding spinlock in ceph_dir_fsync
ceph: avoid useless dget/dput in encode_fh
ceph: dereference pointer after checking for NULL
crush: fix force for non-root TAKE
ceph: remove unnecessary d_fsdata conditional checks
ceph: Use kmemdup rather than duplicating its implementation
Fix up conflicts in fs/ceph/super.c (d_alloc_root() failure handling vs
always initialize the dentry in open_root_dentry)
Diffstat (limited to 'net')
-rw-r--r-- | net/ceph/crush/mapper.c | 11 | ||||
-rw-r--r-- | net/ceph/crypto.c | 3 | ||||
-rw-r--r-- | net/ceph/osd_client.c | 21 |
3 files changed, 15 insertions, 20 deletions
diff --git a/net/ceph/crush/mapper.c b/net/ceph/crush/mapper.c index 3a94eae7abe9..b79747c4b645 100644 --- a/net/ceph/crush/mapper.c +++ b/net/ceph/crush/mapper.c | |||
@@ -510,10 +510,15 @@ int crush_do_rule(struct crush_map *map, | |||
510 | switch (rule->steps[step].op) { | 510 | switch (rule->steps[step].op) { |
511 | case CRUSH_RULE_TAKE: | 511 | case CRUSH_RULE_TAKE: |
512 | w[0] = rule->steps[step].arg1; | 512 | w[0] = rule->steps[step].arg1; |
513 | if (force_pos >= 0) { | 513 | |
514 | BUG_ON(force_context[force_pos] != w[0]); | 514 | /* find position in force_context/hierarchy */ |
515 | while (force_pos >= 0 && | ||
516 | force_context[force_pos] != w[0]) | ||
515 | force_pos--; | 517 | force_pos--; |
516 | } | 518 | /* and move past it */ |
519 | if (force_pos >= 0) | ||
520 | force_pos--; | ||
521 | |||
517 | wsize = 1; | 522 | wsize = 1; |
518 | break; | 523 | break; |
519 | 524 | ||
diff --git a/net/ceph/crypto.c b/net/ceph/crypto.c index 85f3bc0a7062..b780cb7947dd 100644 --- a/net/ceph/crypto.c +++ b/net/ceph/crypto.c | |||
@@ -15,10 +15,9 @@ int ceph_crypto_key_clone(struct ceph_crypto_key *dst, | |||
15 | const struct ceph_crypto_key *src) | 15 | const struct ceph_crypto_key *src) |
16 | { | 16 | { |
17 | memcpy(dst, src, sizeof(struct ceph_crypto_key)); | 17 | memcpy(dst, src, sizeof(struct ceph_crypto_key)); |
18 | dst->key = kmalloc(src->len, GFP_NOFS); | 18 | dst->key = kmemdup(src->key, src->len, GFP_NOFS); |
19 | if (!dst->key) | 19 | if (!dst->key) |
20 | return -ENOMEM; | 20 | return -ENOMEM; |
21 | memcpy(dst->key, src->key, src->len); | ||
22 | return 0; | 21 | return 0; |
23 | } | 22 | } |
24 | 23 | ||
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c index f4f3f58f5234..5e254055c910 100644 --- a/net/ceph/osd_client.c +++ b/net/ceph/osd_client.c | |||
@@ -29,8 +29,8 @@ static void __register_request(struct ceph_osd_client *osdc, | |||
29 | struct ceph_osd_request *req); | 29 | struct ceph_osd_request *req); |
30 | static void __unregister_linger_request(struct ceph_osd_client *osdc, | 30 | static void __unregister_linger_request(struct ceph_osd_client *osdc, |
31 | struct ceph_osd_request *req); | 31 | struct ceph_osd_request *req); |
32 | static int __send_request(struct ceph_osd_client *osdc, | 32 | static void __send_request(struct ceph_osd_client *osdc, |
33 | struct ceph_osd_request *req); | 33 | struct ceph_osd_request *req); |
34 | 34 | ||
35 | static int op_needs_trail(int op) | 35 | static int op_needs_trail(int op) |
36 | { | 36 | { |
@@ -1022,8 +1022,8 @@ out: | |||
1022 | /* | 1022 | /* |
1023 | * caller should hold map_sem (for read) and request_mutex | 1023 | * caller should hold map_sem (for read) and request_mutex |
1024 | */ | 1024 | */ |
1025 | static int __send_request(struct ceph_osd_client *osdc, | 1025 | static void __send_request(struct ceph_osd_client *osdc, |
1026 | struct ceph_osd_request *req) | 1026 | struct ceph_osd_request *req) |
1027 | { | 1027 | { |
1028 | struct ceph_osd_request_head *reqhead; | 1028 | struct ceph_osd_request_head *reqhead; |
1029 | 1029 | ||
@@ -1041,7 +1041,6 @@ static int __send_request(struct ceph_osd_client *osdc, | |||
1041 | ceph_msg_get(req->r_request); /* send consumes a ref */ | 1041 | ceph_msg_get(req->r_request); /* send consumes a ref */ |
1042 | ceph_con_send(&req->r_osd->o_con, req->r_request); | 1042 | ceph_con_send(&req->r_osd->o_con, req->r_request); |
1043 | req->r_sent = req->r_osd->o_incarnation; | 1043 | req->r_sent = req->r_osd->o_incarnation; |
1044 | return 0; | ||
1045 | } | 1044 | } |
1046 | 1045 | ||
1047 | /* | 1046 | /* |
@@ -1726,17 +1725,9 @@ int ceph_osdc_start_request(struct ceph_osd_client *osdc, | |||
1726 | dout("send_request %p no up osds in pg\n", req); | 1725 | dout("send_request %p no up osds in pg\n", req); |
1727 | ceph_monc_request_next_osdmap(&osdc->client->monc); | 1726 | ceph_monc_request_next_osdmap(&osdc->client->monc); |
1728 | } else { | 1727 | } else { |
1729 | rc = __send_request(osdc, req); | 1728 | __send_request(osdc, req); |
1730 | if (rc) { | ||
1731 | if (nofail) { | ||
1732 | dout("osdc_start_request failed send, " | ||
1733 | " will retry %lld\n", req->r_tid); | ||
1734 | rc = 0; | ||
1735 | } else { | ||
1736 | __unregister_request(osdc, req); | ||
1737 | } | ||
1738 | } | ||
1739 | } | 1729 | } |
1730 | rc = 0; | ||
1740 | } | 1731 | } |
1741 | 1732 | ||
1742 | out_unlock: | 1733 | out_unlock: |