aboutsummaryrefslogtreecommitdiffstats
path: root/fs/exportfs/expfs.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2013-10-16 15:48:53 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-11-09 00:16:35 -0500
commit854ff5caabb5974b7464b438aba0bc47f1b6cf34 (patch)
tree68cb6bb9a1f80fcf749dda1e44df6a7de2a52ccf /fs/exportfs/expfs.c
parent13a2c3be03973d61b6cb89ff870e758c86327bb7 (diff)
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>
Diffstat (limited to 'fs/exportfs/expfs.c')
-rw-r--r--fs/exportfs/expfs.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/exportfs/expfs.c b/fs/exportfs/expfs.c
index c43fe9b39ff2..6d0a7fa9abb3 100644
--- a/fs/exportfs/expfs.c
+++ b/fs/exportfs/expfs.c
@@ -112,18 +112,14 @@ reconnect_path(struct vfsmount *mnt, struct dentry *target_dir, char *nbuf)
112 while (target_dir->d_flags & DCACHE_DISCONNECTED && noprogress++ < 10) { 112 while (target_dir->d_flags & DCACHE_DISCONNECTED && noprogress++ < 10) {
113 struct dentry *pd = find_disconnected_root(target_dir); 113 struct dentry *pd = find_disconnected_root(target_dir);
114 114
115 BUG_ON(pd == mnt->mnt_sb->s_root);
116
115 if (!IS_ROOT(pd)) { 117 if (!IS_ROOT(pd)) {
116 /* must have found a connected parent - great */ 118 /* must have found a connected parent - great */
117 spin_lock(&pd->d_lock); 119 spin_lock(&pd->d_lock);
118 pd->d_flags &= ~DCACHE_DISCONNECTED; 120 pd->d_flags &= ~DCACHE_DISCONNECTED;
119 spin_unlock(&pd->d_lock); 121 spin_unlock(&pd->d_lock);
120 noprogress = 0; 122 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;
127 } else { 123 } else {
128 /* 124 /*
129 * We have hit the top of a disconnected path, try to 125 * We have hit the top of a disconnected path, try to