Re: [PATCH] fs: allow do_renameat2() over bind mounts of the same filesystem.

2020-08-29 Thread Florian Margaine
Matthew Wilcox writes: > On Sat, Aug 29, 2020 at 11:23:34PM +0200, Florian Margaine wrote: >> Al Viro writes: >> >> > On Fri, Aug 28, 2020 at 10:40:35PM +0200, Florian Margaine wrote: >> >> There's currently this seemingly unnecessary limitation that rename() >> >> cannot work over bind mounts

Re: [PATCH] fs: allow do_renameat2() over bind mounts of the same filesystem.

2020-08-29 Thread Matthew Wilcox
On Sat, Aug 29, 2020 at 11:23:34PM +0200, Florian Margaine wrote: > Al Viro writes: > > > On Fri, Aug 28, 2020 at 10:40:35PM +0200, Florian Margaine wrote: > >> There's currently this seemingly unnecessary limitation that rename() > >> cannot work over bind mounts of the same filesystem, > > > >

Re: [PATCH] fs: allow do_renameat2() over bind mounts of the same filesystem.

2020-08-29 Thread Florian Margaine
Al Viro writes: > On Fri, Aug 28, 2020 at 10:40:35PM +0200, Florian Margaine wrote: >> There's currently this seemingly unnecessary limitation that rename() >> cannot work over bind mounts of the same filesystem, > > ... is absolutely deliberate - that's how you set a boundary in the > tree, prev

Re: [PATCH] fs: allow do_renameat2() over bind mounts of the same filesystem.

2020-08-28 Thread Al Viro
On Fri, Aug 28, 2020 at 10:40:35PM +0200, Florian Margaine wrote: > There's currently this seemingly unnecessary limitation that rename() > cannot work over bind mounts of the same filesystem, ... is absolutely deliberate - that's how you set a boundary in the tree, preventing both links and renam

[PATCH] fs: allow do_renameat2() over bind mounts of the same filesystem.

2020-08-28 Thread Florian Margaine
There's currently this seemingly unnecessary limitation that rename() cannot work over bind mounts of the same filesystem, because the current check is against the vfsmount, not over the superblock. Given that the path in do_renameat2() is using dentries, the rename is properly supported across dif