On Thu, Sep 12, 2019 at 4:23 PM J. Bruce Fields <bfields@xxxxxxxxxxxx> wrote: > > On Fri, Sep 06, 2019 at 03:46:17PM -0400, Olga Kornievskaia wrote: > > +static int read_name_gen = 1; > > +#define SSC_READ_NAME_BODY "ssc_read_%d" > > + > ... > > + res = ERR_PTR(-ENOMEM); > > + len = strlen(SSC_READ_NAME_BODY) + 16; > > + read_name = kzalloc(len, GFP_NOFS); > > + if (read_name == NULL) > > + goto out; > > + snprintf(read_name, len, SSC_READ_NAME_BODY, read_name_gen++); > ... > > + filep = alloc_file_pseudo(r_ino, ss_mnt, read_name, FMODE_READ, > > + r_ino->i_fop); > > So, I"m curious: does this "name" ever get used anywhere? Can you see > it from userspace somehow, for example? Does it have some debugging > value? Or could it just be the empty string? Name isn't seen anywhere (nor is the mount visible to the use -- ie doing a mount command). It's needed to create a file structure to represent the file opened the source server (without the open). Honestly, I'm not sure what kind of weirdness can arise from having an empty name string. Is there a reason for not trying to generate unique names for this? > > --b.