On Tue, Oct 8, 2013 at 9:06 AM, Miklos Szeredi <miklos@xxxxxxxxxx> wrote: > On Mon, Oct 07, 2013 at 03:25:17PM -0700, Eric W. Biederman wrote: >> Andy Lutomirski <luto@xxxxxxxxxxxxxx> writes: >> >> > On Mon, Oct 7, 2013 at 7:55 AM, Eric W. Biederman <ebiederm@xxxxxxxxxxxx> wrote: >> >> "Serge E. Hallyn" <serge@xxxxxxxxxx> writes: >> >> >> >>> Quoting Eric W. Biederman (ebiederm@xxxxxxxxxxxx): >> >>>> >> >>>> Programs have been known to test for empty directories by attempting >> >>>> to remove them. To keep from violating the principle of least >> >>>> surprise don't let directories the caller can see with someting >> >>>> mounted on them be deleted. >> >>> >> >>> Do you think we should do the same thing for over-mounted file at >> >>> vfs_unlink()? >> >> >> >> We easily could. > > And for vfs_rename()? > > I think the risks of changing behavior outweigh the benefits. How many times > did you have to remove or rename a mounted file or directory? It's very rarely > needed. I do this every time I reinstall a system while running that system. Admittedly, mount --move works, but that's a really unpleasant interface. When rename2 gets added, there could be a flag RENAME_MOVE_MOUNT to opt in. --Andy > > Thanks, > Miklos -- Andy Lutomirski AMA Capital Management, LLC -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html