Re: NFS crash (2.4; probably symlink-related)

From: Trond Myklebust (trond.myklebust@fys.uio.no)
Date: Mon Jun 12 2000 - 17:11:09 EST


>>>>> " " == Jan Kasprzak <kas@informatics.muni.cz> writes:

> Do you have any idea of what's the problem here?
> Here is the relevant part of /var/log/messages:

> Jun 12 19:53:12 server mountd[787]: authenticated unmount
> request from client.fi.muni.cz:942 for
> /export/packages.run.linux (/export/packages.run.linux) Jun 12
> 19:53:27 server kernel: Negative d_count (-1) for

Mea culpa. My patch for exp_rootfh() was only half-correct. I assumed
that fh_compose() dget()s the nd.dentry. Dave Higgens exposed me on
this one, but was kind enough not to do so in public...

The following is a quick fix. The final patch really ought to move the
dget() into fh_compose itself. It's quite ugly to have to recurse
though these different routines in order to balance your dget()s and
dput()s.

Cheers,
  Trond

--- fs/nfsd/export.c.orig Mon Jun 12 18:44:46 2000
+++ fs/nfsd/export.c Mon Jun 12 23:46:11 2000
@@ -430,7 +430,7 @@
          * fh must be initialized before calling fh_compose
          */
         fh_init(&fh, maxsize);
- if (fh_compose(&fh, exp, nd.dentry))
+ if (fh_compose(&fh, exp, dget(nd.dentry)))
                 err = -EINVAL;
         else
                 err = 0;

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Jun 15 2000 - 21:00:26 EST