On Tue, Apr 08, 2008 at 04:50:26PM +1000, Barry Naujok wrote:
>>> +static inline struct xfs_name *
>>> +xfs_dentry_name(
>>> + struct xfs_name *namep,
>>> + struct dentry *dentry)
>>> +{
>>> + namep->name = dentry->d_name.name;
>>> + namep->len = dentry->d_name.len;
>>> + return namep;
>>> +}
>>
>> As mentioned in my comment to the CI series: shouldn't you just use
>> a struct qstr instead of adding a new struct xfs_name?
>
> Keeping a clean line between fs/xfs and fs/xfs/linux-2.6.
But this means more stack useage and more copies in every namespace
related operation. I don'y yhink it's a good tradeoff.
If you really care about a clear separatation add a #define or typedef
for xfs_name to struct qstr.
>> Also please don't add inline for this.
>>> +xfs_name_t xfs_name_dotdot = {"..", 2};
>>
>> const?
>
> I should change all calls using xfs_name to use const xfs_name?
I just mean this global variable should be declared const. Then
again all the xfs_name arguments are immutable, so it might be worth
marking them const.
|