On Thu, Aug 17, 2023 at 5:32 PM Christian Brauner <brauner@xxxxxxxxxx> wrote: > > On Thu, Aug 17, 2023 at 04:55:55PM +0300, Amir Goldstein wrote: > > On Thu, Aug 17, 2023 at 4:38 PM Christian Brauner <brauner@xxxxxxxxxx> wrote: > > > > > > On Thu, Aug 17, 2023 at 08:44:46AM +0300, Amir Goldstein wrote: > > > > overlayfs is going to use those to grab a write reference on the > > > > upper fs during copy up. > > > > > > > > Signed-off-by: Amir Goldstein <amir73il@xxxxxxxxx> > > > > --- > > > > > > > > Christian, > > > > > > > > This patch is needed for the ovl_want_write() changes [1], > > > > which I forgot to CC you on. > > > > > > > > Please ACK if you approve. > > > > > > > > Thanks, > > > > Amir. > > > > > > > > [1] https://lore.kernel.org/linux-unionfs/20230816152334.924960-1-amir73il@xxxxxxxxx/ > > > > > > > > fs/namespace.c | 2 ++ > > > > 1 file changed, 2 insertions(+) > > > > > > > > diff --git a/fs/namespace.c b/fs/namespace.c > > > > index e157efc54023..370328b204f1 100644 > > > > --- a/fs/namespace.c > > > > +++ b/fs/namespace.c > > > > @@ -386,6 +386,7 @@ int __mnt_want_write(struct vfsmount *m) > > > > > > > > return ret; > > > > } > > > > +EXPORT_SYMBOL_GPL(__mnt_want_write); > > > > > > Puh, not excited about that but also no real reason to say no other than > > > generic worries about it being abused. > > > But maybe let's not export underscore variants. Might make sense to at > > > least name them differently? mnt_want_write_locked()? > > > > Heh, it's not locked. It happens to be called with sb_start_write() from > > mnt_want_write(), but from do_dentry_open() it's actually called *before* > > file_start_write(), because the mnt_writers refcount and sb_writers lock > > are not strictly ordered, which is very convenient for ovl copy up. > > > > We could go for mnt_{get,put}_write(), but that's a bit close to > > mnt_get_writers(). > > > > We could go for mnt_{get,put}_write_access(), like helpers with similar > > names for inode. > > Fine by me. I'm just not happy with this __*() thing. > > > > > I don't really mind, as long as this doesn't become a bike shedding thing... > > So I brought all that paint for nothing? LoL :) I will take it as an ACK for exporting either mnt_{get,put}_write() or mnt_{get,put}_write_access() symbols. If no objections are raised I will go for the shorter option. Thanks, Amir.