From: Linus Torvalds Date: Fri, 14 Jan 2011 21:26:18 +0000 (-0800) Subject: Turn d_set_d_op() BUG_ON() into WARN_ON_ONCE() X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=6f7f7caab259026234277b659485d22c1dcb1ab4;p=sagit-ice-cold%2Fkernel_xiaomi_msm8998.git 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: Alex Elder Cc: Ian Kent Cc: Nick Piggin Cc: Al Viro Signed-off-by: Linus Torvalds --- diff --git a/fs/dcache.c b/fs/dcache.c index 0c6d5c549d84..274a22250380 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -1357,8 +1357,8 @@ EXPORT_SYMBOL(d_alloc_name); void d_set_d_op(struct dentry *dentry, const struct dentry_operations *op) { - BUG_ON(dentry->d_op); - BUG_ON(dentry->d_flags & (DCACHE_OP_HASH | + WARN_ON_ONCE(dentry->d_op); + WARN_ON_ONCE(dentry->d_flags & (DCACHE_OP_HASH | DCACHE_OP_COMPARE | DCACHE_OP_REVALIDATE | DCACHE_OP_DELETE ));