]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
nfs: BUG_ON in nfs_follow_mountpoint
authorDenis V. Lunev <den@openvz.org>
Mon, 11 Aug 2008 08:02:34 +0000 (12:02 +0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 7 Oct 2008 22:15:16 +0000 (18:15 -0400)
Unfortunately, BUG_ON(IS_ROOT(dentry)) can happen inside
nfs_follow_mountpoint with NFS running Fedora 8 using a
specific setup.
https://bugzilla.redhat.com/show_bug.cgi?id=458622

So, the situation should be handled on NFS client gracefully.

Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Trond Myklebust <Trond.Myklebust@netapp.com>
CC: J. Bruce Fields <bfields@fieldses.org>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/namespace.c

index d398775a3af57503aa3ecf6bbaa3db4d0cfd0ba7..64a288ee046d027692f1dc395792609cfe1760aa 100644 (file)
@@ -105,7 +105,10 @@ static void * nfs_follow_mountpoint(struct dentry *dentry, struct nameidata *nd)
 
        dprintk("--> nfs_follow_mountpoint()\n");
 
-       BUG_ON(IS_ROOT(dentry));
+       err = -ESTALE;
+       if (IS_ROOT(dentry))
+               goto out_err;
+
        dprintk("%s: enter\n", __func__);
        dput(nd->path.dentry);
        nd->path.dentry = dget(dentry);