Re: [PATCH 1/7] fuse: check directory aliasing in mkdir

From: Miklos Szeredi
Date: Mon Nov 28 2005 - 15:09:04 EST


> > Check the created directory inode for aliases in the mkdir() method.
>
>
> Can't you use d_add_unique() here?

The patch is checking for hashed aliases of an inode. E.g. if /foo is
a directory and has a ID of 28, and mkdir /bar returns the same ID,
then the mkdir should fail.

It's an illegal for the filesystem to create two directories refering
to the same inode.

OTOH d_add_unique() is looking for unhashed aliases to resurrect,
which may or may not make sense in fuse. I'll think about it a bit
more.

Thanks,
Miklos
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/