From: James Simmons <jsimmons@infradead.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
devel@driverdev.osuosl.org,
Andreas Dilger <andreas.dilger@intel.com>,
Oleg Drokin <oleg.drokin@intel.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Lustre Development List <lustre-devel@lists.lustre.org>,
Swapnil Pimpale <spimpale@ddn.com>,
James Simmons <jsimmons@infradead.org>
Subject: [PATCH 09/12] staging: lustre: llite: check ret of ll_prep_md_op_data in ll_dir_filler
Date: Wed, 27 Apr 2016 21:37:18 -0400 [thread overview]
Message-ID: <1461807441-3210-10-git-send-email-jsimmons@infradead.org> (raw)
In-Reply-To: <1461807441-3210-1-git-send-email-jsimmons@infradead.org>
From: Swapnil Pimpale <spimpale@ddn.com>
ll_dir_filler() now checks the returned pointer from
ll_prep_md_op_data() using IS_ERR()
Signed-off-by: Swapnil Pimpale <spimpale@ddn.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4082
Reviewed-on: http://review.whamcloud.com/8073
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
drivers/staging/lustre/lustre/llite/dir.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/lustre/lustre/llite/dir.c b/drivers/staging/lustre/lustre/llite/dir.c
index 09d3297..56aa7de 100644
--- a/drivers/staging/lustre/lustre/llite/dir.c
+++ b/drivers/staging/lustre/lustre/llite/dir.c
@@ -163,6 +163,11 @@ static int ll_dir_filler(void *_hash, struct page *page0)
LASSERT(max_pages > 0 && max_pages <= MD_MAX_BRW_PAGES);
+ op_data = ll_prep_md_op_data(NULL, inode, NULL, NULL, 0, 0,
+ LUSTRE_OPC_ANY, NULL);
+ if (IS_ERR(op_data))
+ return PTR_ERR(op_data);
+
page_pool = kcalloc(max_pages, sizeof(page), GFP_NOFS);
if (page_pool) {
page_pool[0] = page0;
@@ -177,8 +182,6 @@ static int ll_dir_filler(void *_hash, struct page *page0)
page_pool[npages] = page;
}
- op_data = ll_prep_md_op_data(NULL, inode, NULL, NULL, 0, 0,
- LUSTRE_OPC_ANY, NULL);
op_data->op_npages = npages;
op_data->op_offset = hash;
rc = md_readpage(exp, op_data, page_pool, &request);
--
2.7.4
next prev parent reply other threads:[~2016-04-28 1:37 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-28 1:37 [PATCH 00/12] staging: lustre: add patches from lustre 2.5.52 version James Simmons
2016-04-28 1:37 ` [PATCH 01/12] staging: lustre: obd: remove newline from LCONSOLE string James Simmons
2016-04-28 1:37 ` [PATCH 02/12] staging: lustre: obd: add newline for dumped config record James Simmons
2016-04-28 1:37 ` [PATCH 03/12] staging: lustre: ptlrpc: use unified handler for OST requests James Simmons
2016-04-28 1:37 ` [PATCH 04/12] staging: lustre: ldlm: check all errors during ldlm_debugfs_setup() James Simmons
2016-04-28 1:37 ` [PATCH 05/12] staging: lustre: obd: cleanup client import if client_obd_setup fails James Simmons
2016-04-28 1:37 ` [PATCH 06/12] staging: lustre: fid: add a connect flag for open by FID James Simmons
2016-04-28 1:37 ` [PATCH 07/12] staging: lustre: libcfs: Fix NUMA emulated mode James Simmons
2016-04-28 1:37 ` [PATCH 08/12] staging: lustre: llite: debugging for ll_file_open LASSERT James Simmons
2016-04-28 1:37 ` James Simmons [this message]
2016-04-28 1:37 ` [PATCH 10/12] staging: lustre: llog: we don't need vfsmount James Simmons
2016-04-28 1:37 ` [PATCH 11/12] staging: lustre: ptlrpc: initialize request session early James Simmons
2016-04-28 1:37 ` [PATCH 12/12] staging: lustre: llite: fixup return value ll_direct_IO_26 James Simmons
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1461807441-3210-10-git-send-email-jsimmons@infradead.org \
--to=jsimmons@infradead.org \
--cc=andreas.dilger@intel.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lustre-devel@lists.lustre.org \
--cc=oleg.drokin@intel.com \
--cc=spimpale@ddn.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®