From: Oleg Drokin <green@linuxhacker.ru>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org
Cc: yang sheng <yang.sheng@intel.com>, Oleg Drokin <oleg.drokin@intel.com>
Subject: [PATCH 3/5] lustre: instantiate negative dentry
Date: Sun, 9 Feb 2014 02:51:47 -0500 [thread overview]
Message-ID: <1391932309-6009-4-git-send-email-green@linuxhacker.ru> (raw)
In-Reply-To: <1391932309-6009-1-git-send-email-green@linuxhacker.ru>
From: yang sheng <yang.sheng@intel.com>
In the atomic_open callback. We should instantiate
negative dentry. Else will got sanity:183 failed.
Signed-off-by: yang sheng <yang.sheng@intel.com>
Reviewed-on: http://review.whamcloud.com/8110
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3228
Reviewed-by: Peng Tao <bergwolf@gmail.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
---
drivers/staging/lustre/lustre/llite/namei.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/staging/lustre/lustre/llite/namei.c b/drivers/staging/lustre/lustre/llite/namei.c
index 8938d37..93c3744 100644
--- a/drivers/staging/lustre/lustre/llite/namei.c
+++ b/drivers/staging/lustre/lustre/llite/namei.c
@@ -468,6 +468,12 @@ int ll_lookup_it_finish(struct ptlrpc_request *request,
if (IS_ERR(alias))
return PTR_ERR(alias);
*de = alias;
+ } else if (!it_disposition(it, DISP_LOOKUP_NEG) &&
+ !it_disposition(it, DISP_OPEN_CREATE)) {
+ /* With DISP_OPEN_CREATE dentry will
+ instantiated in ll_create_it. */
+ LASSERT((*de)->d_inode == NULL);
+ d_instantiate(*de, inode);
}
if (!it_disposition(it, DISP_LOOKUP_NEG)) {
--
1.8.5.3
next prev parent reply other threads:[~2014-02-09 7:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-09 7:51 [PATCH 0/5] Lustre fixes Oleg Drokin
2014-02-09 7:51 ` [PATCH 1/5] lustre/lov: avoid subobj's coh_parent race Oleg Drokin
2014-02-09 7:51 ` [PATCH 2/5] lustre: Unsafe error handling around ll_splice_alias Oleg Drokin
2014-02-09 7:51 ` Oleg Drokin [this message]
2014-02-09 7:51 ` [PATCH 4/5] lustre/xattr: separate ACL and XATTR caches Oleg Drokin
2014-02-09 7:51 ` [PATCH 5/5] lustre: don't leak llog handle in llog_cat_process_cb() Oleg Drokin
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=1391932309-6009-4-git-send-email-green@linuxhacker.ru \
--to=green@linuxhacker.ru \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg.drokin@intel.com \
--cc=yang.sheng@intel.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
Powered by JetHome