Skip to content

Commit

Permalink
Turn d_set_d_op() BUG_ON() into WARN_ON_ONCE()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Ian Kent <[email protected]>
Cc: Nick Piggin <[email protected]>
Cc: Al Viro <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
torvalds committed Jan 14, 2011
1 parent d018b6f commit 6f7f7ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/dcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 ));
Expand Down

0 comments on commit 6f7f7ca

Please sign in to comment.