diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-04 17:22:20 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-04 17:22:20 -0400 |
commit | bd355f8ae6577aa6b444ab76bb1dfeb1a7002d9f (patch) | |
tree | b88b57915ccc335cb1391abf3da5fa59bd5e6ac5 /net | |
parent | 1c08232cfe5e68c6234305a3abb64d52d89c9ead (diff) | |
parent | fca65b4ad72d28cbb43a029114d04b89f06faadb (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: do not call __mark_dirty_inode under i_lock
libceph: fix ceph_osdc_alloc_request error checks
ceph: handle ceph_osdc_new_request failure in ceph_writepages_start
libceph: fix ceph_msg_new error path
ceph: use ihold() when i_lock is held
Diffstat (limited to 'net')
-rw-r--r-- | net/ceph/messenger.c | 26 | ||||
-rw-r--r-- | net/ceph/osd_client.c | 4 |
2 files changed, 15 insertions, 15 deletions
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index 05f357828a2f..e15a82ccc05f 100644 --- a/net/ceph/messenger.c +++ b/net/ceph/messenger.c | |||
@@ -2267,6 +2267,19 @@ struct ceph_msg *ceph_msg_new(int type, int front_len, gfp_t flags) | |||
2267 | m->more_to_follow = false; | 2267 | m->more_to_follow = false; |
2268 | m->pool = NULL; | 2268 | m->pool = NULL; |
2269 | 2269 | ||
2270 | /* middle */ | ||
2271 | m->middle = NULL; | ||
2272 | |||
2273 | /* data */ | ||
2274 | m->nr_pages = 0; | ||
2275 | m->page_alignment = 0; | ||
2276 | m->pages = NULL; | ||
2277 | m->pagelist = NULL; | ||
2278 | m->bio = NULL; | ||
2279 | m->bio_iter = NULL; | ||
2280 | m->bio_seg = 0; | ||
2281 | m->trail = NULL; | ||
2282 | |||
2270 | /* front */ | 2283 | /* front */ |
2271 | if (front_len) { | 2284 | if (front_len) { |
2272 | if (front_len > PAGE_CACHE_SIZE) { | 2285 | if (front_len > PAGE_CACHE_SIZE) { |
@@ -2286,19 +2299,6 @@ struct ceph_msg *ceph_msg_new(int type, int front_len, gfp_t flags) | |||
2286 | } | 2299 | } |
2287 | m->front.iov_len = front_len; | 2300 | m->front.iov_len = front_len; |
2288 | 2301 | ||
2289 | /* middle */ | ||
2290 | m->middle = NULL; | ||
2291 | |||
2292 | /* data */ | ||
2293 | m->nr_pages = 0; | ||
2294 | m->page_alignment = 0; | ||
2295 | m->pages = NULL; | ||
2296 | m->pagelist = NULL; | ||
2297 | m->bio = NULL; | ||
2298 | m->bio_iter = NULL; | ||
2299 | m->bio_seg = 0; | ||
2300 | m->trail = NULL; | ||
2301 | |||
2302 | dout("ceph_msg_new %p front %d\n", m, front_len); | 2302 | dout("ceph_msg_new %p front %d\n", m, front_len); |
2303 | return m; | 2303 | return m; |
2304 | 2304 | ||
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c index 5a80f41c0cba..6b5dda1cb5df 100644 --- a/net/ceph/osd_client.c +++ b/net/ceph/osd_client.c | |||
@@ -470,8 +470,8 @@ struct ceph_osd_request *ceph_osdc_new_request(struct ceph_osd_client *osdc, | |||
470 | snapc, ops, | 470 | snapc, ops, |
471 | use_mempool, | 471 | use_mempool, |
472 | GFP_NOFS, NULL, NULL); | 472 | GFP_NOFS, NULL, NULL); |
473 | if (IS_ERR(req)) | 473 | if (!req) |
474 | return req; | 474 | return NULL; |
475 | 475 | ||
476 | /* calculate max write size */ | 476 | /* calculate max write size */ |
477 | calc_layout(osdc, vino, layout, off, plen, req, ops); | 477 | calc_layout(osdc, vino, layout, off, plen, req, ops); |