From: Richard Weinberger <richard@nod.at> To: linux-fsdevel@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Richard Weinberger <richard@nod.at>, Mark Fasheh <mfasheh@suse.com>, Joel Becker <jlbec@evilplan.org>, ocfs2-devel@oss.oracle.com Subject: [PATCH 2/2] ocfs2: Fix d_splice_alias() return code checking Date: Sun, 19 Oct 2014 12:39:44 +0200 [thread overview] Message-ID: <1413715184-30196-2-git-send-email-richard@nod.at> (raw) In-Reply-To: <1413715184-30196-1-git-send-email-richard@nod.at> d_splice_alias() can return a valid dentry, NULL or an ERR_PTR. Currently the code checks not for ERR_PTR and my oops in ocfs2_dentry_attach_lock(). Fix this by using IS_ERR_OR_NULL(). Cc: Mark Fasheh <mfasheh@suse.com> Cc: Joel Becker <jlbec@evilplan.org> Cc: ocfs2-devel@oss.oracle.com Signed-off-by: Richard Weinberger <richard@nod.at> --- fs/ocfs2/namei.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c index 8add6f1..b931e04 100644 --- a/fs/ocfs2/namei.c +++ b/fs/ocfs2/namei.c @@ -158,7 +158,7 @@ bail_add: * NOTE: This dentry already has ->d_op set from * ocfs2_get_parent() and ocfs2_get_dentry() */ - if (ret) + if (!IS_ERR_OR_NULL(ret)) dentry = ret; status = ocfs2_dentry_attach_lock(dentry, inode, -- 2.1.0
WARNING: multiple messages have this Message-ID (diff)
From: Richard Weinberger <richard@nod.at> To: linux-fsdevel@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Richard Weinberger <richard@nod.at>, Mark Fasheh <mfasheh@suse.com>, Joel Becker <jlbec@evilplan.org>, ocfs2-devel@oss.oracle.com Subject: [Ocfs2-devel] [PATCH 2/2] ocfs2: Fix d_splice_alias() return code checking Date: Sun, 19 Oct 2014 12:39:44 +0200 [thread overview] Message-ID: <1413715184-30196-2-git-send-email-richard@nod.at> (raw) In-Reply-To: <1413715184-30196-1-git-send-email-richard@nod.at> d_splice_alias() can return a valid dentry, NULL or an ERR_PTR. Currently the code checks not for ERR_PTR and my oops in ocfs2_dentry_attach_lock(). Fix this by using IS_ERR_OR_NULL(). Cc: Mark Fasheh <mfasheh@suse.com> Cc: Joel Becker <jlbec@evilplan.org> Cc: ocfs2-devel at oss.oracle.com Signed-off-by: Richard Weinberger <richard@nod.at> --- fs/ocfs2/namei.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c index 8add6f1..b931e04 100644 --- a/fs/ocfs2/namei.c +++ b/fs/ocfs2/namei.c @@ -158,7 +158,7 @@ bail_add: * NOTE: This dentry already has ->d_op set from * ocfs2_get_parent() and ocfs2_get_dentry() */ - if (ret) + if (!IS_ERR_OR_NULL(ret)) dentry = ret; status = ocfs2_dentry_attach_lock(dentry, inode, -- 2.1.0
next prev parent reply other threads:[~2014-10-19 10:40 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-10-19 10:39 [PATCH 1/2] fat: Fix d_splice_alias() return code checking Richard Weinberger 2014-10-19 10:39 ` Richard Weinberger [this message] 2014-10-19 10:39 ` [Ocfs2-devel] [PATCH 2/2] ocfs2: " Richard Weinberger 2014-10-20 23:12 ` Andrew Morton 2014-10-20 23:12 ` Andrew Morton 2014-10-22 20:33 ` Richard Weinberger 2014-10-22 20:33 ` Richard Weinberger 2014-10-20 12:34 ` [PATCH 1/2] fat: " Al Viro 2014-10-23 15:21 ` OGAWA Hirofumi
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=1413715184-30196-2-git-send-email-richard@nod.at \ --to=richard@nod.at \ --cc=jlbec@evilplan.org \ --cc=linux-fsdevel@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=mfasheh@suse.com \ --cc=ocfs2-devel@oss.oracle.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.