From: Kulikov Vasiliy <segooon@gmail.com>
To: kernel-janitors@vger.kernel.org
Cc: Artem Bityutskiy <dedekind1@gmail.com>,
Vasiliy Kulikov <segooon@gmail.com>,
linux-kernel@vger.kernel.org, Julia Lawall <julia@diku.dk>,
Tejun Heo <tj@kernel.org>,
linux-mtd@lists.infradead.org,
Adrian Hunter <adrian.hunter@nokia.com>
Subject: [PATCH 12/14] ubifs: check return code of pnode_lookup
Date: Sun, 05 Sep 2010 18:33:04 +0000 [thread overview]
Message-ID: <1283711584-7587-1-git-send-email-segooon@gmail.com> (raw)
From: Vasiliy Kulikov <segooon@gmail.com>
Function pnode_lookup may return ERR_PTR(...). Check for it.
Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
---
Compile tested.
fs/ubifs/lpt_commit.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/fs/ubifs/lpt_commit.c b/fs/ubifs/lpt_commit.c
index d12535b..5c90dec 100644
--- a/fs/ubifs/lpt_commit.c
+++ b/fs/ubifs/lpt_commit.c
@@ -705,6 +705,9 @@ static int make_tree_dirty(struct ubifs_info *c)
struct ubifs_pnode *pnode;
pnode = pnode_lookup(c, 0);
+ if (IS_ERR(pnode))
+ return PTR_ERR(pnode);
+
while (pnode) {
do_make_pnode_dirty(c, pnode);
pnode = next_pnode_to_dirty(c, pnode);
--
1.7.0.4
reply other threads:[~2010-09-05 18:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1283711584-7587-1-git-send-email-segooon@gmail.com \
--to=segooon@gmail.com \
--cc=adrian.hunter@nokia.com \
--cc=dedekind1@gmail.com \
--cc=julia@diku.dk \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=tj@kernel.org \
/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