Re: [PATCH -V16 07/12] vfs: Support null pathname in linkat

From: Miklos Szeredi
Date: Mon Jul 12 2010 - 13:05:41 EST


On Mon, 12 Jul 2010, Aneesh Kumar K. V wrote:
> /*
> * Return -ENOENT if we've raced with unlink and i_nlink is 0. Doing
> * otherwise has the potential to corrupt the orphan inode list.
> */
> if (inode->i_nlink == 0)
> return -ENOENT;
>
> I can move this check to VFS so that we do it for all file systems.

That makes sense. Hopefully filesystems which implement hard links
will change i_nlink to zero for the last unlink...

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/