From: vitaly Date: Fri, 29 Sep 2006 18:18:54 +0000 (+0000) Subject: Branch b_new_cmd X-Git-Tag: v1_8_0_110~486^2~753 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=c5d4ac44151afcf3f44ac8c451cb330638c6331b;p=fs%2Flustre-release.git Branch b_new_cmd allocate enough, do not corrupt memory beyond the allocated region. --- diff --git a/lustre/llite/rw26.c b/lustre/llite/rw26.c index 1c15af3..10e4418 100644 --- a/lustre/llite/rw26.c +++ b/lustre/llite/rw26.c @@ -78,13 +78,14 @@ static int ll_releasepage(struct page *page, gfp_t gfp_mask) static int ll_set_page_dirty(struct page *page) { struct ll_async_page *llap; + ENTRY; llap = llap_from_page(page, LLAP_ORIGIN_UNKNOWN); if (IS_ERR(llap)) RETURN(PTR_ERR(llap)); llap_write_pending(page->mapping->host, llap); - return(__set_page_dirty_nobuffers(page)); + RETURN(__set_page_dirty_nobuffers(page)); } #define MAX_DIRECTIO_SIZE 2*1024*1024*1024UL diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index bba3dfd..9928a52 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -2741,7 +2741,7 @@ static int osc_enqueue(struct obd_export *exp, struct obd_info *oinfo, no_match: if (intent) { - int size[2] = { + int size[3] = { [MSG_PTLRPC_BODY_OFF] = sizeof(struct ptlrpc_body), [DLM_LOCKREQ_OFF] = sizeof(struct ldlm_request) };