Re: [PATCH v3 3/4] ovl: create helper ovl_create_temp()

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

 



On Wed, May 16, 2018 at 1:15 PM, Amir Goldstein <amir73il@xxxxxxxxx> wrote:

>>> @@ -160,6 +160,26 @@ int ovl_create_real(struct inode *dir, struct dentry *newdentry,
>>>         return err;
>>>  }
>>>
>>> +struct dentry *ovl_create_temp(struct dentry *workdir, struct cattr *attr,
>>> +                              struct dentry *hardlink)
>>
>> Talking of cleanups, can we put hardlink into cattr as well?  (separate patch)
>>
>
> OK. If you don't mind, I'll use this opportunity to also namespace
> it to ovl_cattr.

Good idea.

>
>>> +{
>>> +       struct inode *wdir = workdir->d_inode;
>>> +       struct dentry *temp;
>>> +       int err;
>>> +
>>> +       temp = ovl_lookup_temp(workdir);
>>> +       if (IS_ERR(temp))
>>> +               return temp;
>>
>> What's wrong with viro's version of  dentry in ovl_create_real()?
>> Turns this whole function into:
>>
>>         return ovl_create_real(d_inode(workdir),
>> ovl_lookup_temp(workdir), attr, hardlink, true);
>
> Nothing. A matter of taste. If you like Al's version better,
> I'll add it back in the next patch.

Al's version is the functional style yours is the procedural.  I think
in this particular case the functional version looks nicer.

Thanks,
Miklos
--
To unsubscribe from this list: send the line "unsubscribe linux-unionfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystems Devel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux