Commit 854ff5ca authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Al Viro

exportfs: BUG_ON in crazy corner case

This would indicate a nasty bug in the dcache and has never triggered in
the past 10 years as far as I know.
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 13a2c3be
...@@ -112,18 +112,14 @@ reconnect_path(struct vfsmount *mnt, struct dentry *target_dir, char *nbuf) ...@@ -112,18 +112,14 @@ reconnect_path(struct vfsmount *mnt, struct dentry *target_dir, char *nbuf)
while (target_dir->d_flags & DCACHE_DISCONNECTED && noprogress++ < 10) { while (target_dir->d_flags & DCACHE_DISCONNECTED && noprogress++ < 10) {
struct dentry *pd = find_disconnected_root(target_dir); struct dentry *pd = find_disconnected_root(target_dir);
BUG_ON(pd == mnt->mnt_sb->s_root);
if (!IS_ROOT(pd)) { if (!IS_ROOT(pd)) {
/* must have found a connected parent - great */ /* must have found a connected parent - great */
spin_lock(&pd->d_lock); spin_lock(&pd->d_lock);
pd->d_flags &= ~DCACHE_DISCONNECTED; pd->d_flags &= ~DCACHE_DISCONNECTED;
spin_unlock(&pd->d_lock); spin_unlock(&pd->d_lock);
noprogress = 0; noprogress = 0;
} else if (pd == mnt->mnt_sb->s_root) {
printk(KERN_ERR "export: Eeek filesystem root is not connected, impossible\n");
spin_lock(&pd->d_lock);
pd->d_flags &= ~DCACHE_DISCONNECTED;
spin_unlock(&pd->d_lock);
noprogress = 0;
} else { } else {
/* /*
* We have hit the top of a disconnected path, try to * We have hit the top of a disconnected path, try to
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment