Skip to content

Commit 854ff5c

Browse files
Christoph HellwigAl Viro
authored andcommitted
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: Christoph Hellwig <hch@lst.de> Signed-off-by: J. Bruce Fields <bfields@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 13a2c3b commit 854ff5c

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

‎fs/exportfs/expfs.c‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,18 +112,14 @@ reconnect_path(struct vfsmount *mnt, struct dentry *target_dir, char *nbuf)
112112
while (target_dir->d_flags & DCACHE_DISCONNECTED && noprogress++ < 10) {
113113
struct dentry *pd = find_disconnected_root(target_dir);
114114

115+
BUG_ON(pd == mnt->mnt_sb->s_root);
116+
115117
if (!IS_ROOT(pd)) {
116118
/* must have found a connected parent - great */
117119
spin_lock(&pd->d_lock);
118120
pd->d_flags &= ~DCACHE_DISCONNECTED;
119121
spin_unlock(&pd->d_lock);
120122
noprogress = 0;
121-
} else if (pd == mnt->mnt_sb->s_root) {
122-
printk(KERN_ERR "export: Eeek filesystem root is not connected, impossible\n");
123-
spin_lock(&pd->d_lock);
124-
pd->d_flags &= ~DCACHE_DISCONNECTED;
125-
spin_unlock(&pd->d_lock);
126-
noprogress = 0;
127123
} else {
128124
/*
129125
* We have hit the top of a disconnected path, try to

0 commit comments

Comments
 (0)