提交 6f7f7caa 编写于 作者: L Linus Torvalds

Turn d_set_d_op() BUG_ON() into WARN_ON_ONCE()

It's indicative of a real problem, and it actually triggers with
autofs4, but the BUG_ON() is excessive.  The autofs4 case is being fixed
(to only set d_op in the ->lookup method) but not merged yet.  In the
meantime this gets the code limping along.
Reported-by: NAlex Elder <aelder@sgi.com>
Cc: Ian Kent <raven@themaw.net>
Cc: Nick Piggin <npiggin@kernel.dk>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 d018b6f4
...@@ -1357,8 +1357,8 @@ EXPORT_SYMBOL(d_alloc_name); ...@@ -1357,8 +1357,8 @@ EXPORT_SYMBOL(d_alloc_name);
void d_set_d_op(struct dentry *dentry, const struct dentry_operations *op) void d_set_d_op(struct dentry *dentry, const struct dentry_operations *op)
{ {
BUG_ON(dentry->d_op); WARN_ON_ONCE(dentry->d_op);
BUG_ON(dentry->d_flags & (DCACHE_OP_HASH | WARN_ON_ONCE(dentry->d_flags & (DCACHE_OP_HASH |
DCACHE_OP_COMPARE | DCACHE_OP_COMPARE |
DCACHE_OP_REVALIDATE | DCACHE_OP_REVALIDATE |
DCACHE_OP_DELETE )); DCACHE_OP_DELETE ));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册