Re: [PATCH] vfs: add noreplace_rename2()

From: Christoph Hellwig
Date: Tue May 13 2014 - 10:06:28 EST


On Tue, May 13, 2014 at 03:56:22PM +0200, Miklos Szeredi wrote:
> From: Miklos Szeredi <mszeredi@xxxxxxx>
>
> RENAME_NOREPLACE is trivial to implement for most filesystems. This adds a
> helper that can be assigned to ->rename2() and calls ->rename().
>
> Only suitable for local filesystems, i.e. those that cannot have files
> "spontaneously" appear (like NFS and friends).

I don't like this approach at all. Please bite the bullet and rename
->rename2 to ->rename and all the proper rejecting of non-supported
flags intstead of further locking down the duplication.

--
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/