Re: patch for allowing msdos/vfat nfs exports

From: Alexander Viro (
Date: Mon Jul 23 2001 - 20:12:44 EST

On Mon, 23 Jul 2001, Nathan Laredo wrote:

> + result = d_alloc_root(inode);
> + if (result == NULL) {
> + iput(inode);
> + return ERR_PTR(-ENOMEM);
> + }
> + result->d_flags |= DCACHE_NFSD_DISCONNECTED;
> + return result;

Erm... AFAICS it got a race - think of doing that for directory when
dentry is already gone, but inode still in cache. You will get
nfsd_findparent() called and that will give funny results on FAT.

The worst thing being, it _will_ get a decently-looking inode. Inode that
will point to the same blocks as parent directory, but will be completely
independent (different location).

Notice that we will end up reading directories that might be changing
under us - struct inode is different, so exclusion simply doesn't work.

IOW, we need
        if (S_ISDIR(inode->i_mode))
                return ERR_PTR(-ESTALE);
immediately before the chunk above.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Mon Jul 23 2001 - 21:00:18 EST