Re: [PATCH v6 05/19] NFS: inter ssc open

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 12, 2019 at 06:51:58PM -0400, Olga Kornievskaia wrote:
> 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.

I doubt the name matters.

> Is there a reason for not trying to generate unique
> names for this?

I doubt it's a problem, really, just a little unnecessary code.

--b.



[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux