lkml.org 
[lkml]   [2014]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] hfsplus: fix longname handling
On 02/24/2014 11:48 PM, Andrew Morton wrote:
> On Mon, 24 Feb 2014 21:28:27 +0200 Sougata Santra<sougata@tuxera.com> wrote:
>
>>
>> -ENAMETOOLONG returned from hfsplus_asc2uni was not propaged to iops. This
>> allowed hfsplus to create files/directories with HFSPLUS_MAX_STRLEN and
>> incorrect keys, leaving the FS in an inconsistent state. This patch fixes
>> this issue.
>>
>> ...
>>
>> --- a/fs/hfsplus/hfsplus_fs.h
>> +++ b/fs/hfsplus/hfsplus_fs.h
>> @@ -443,8 +443,10 @@ int hfsplus_cat_case_cmp_key(const hfsplus_btree_key *,
>> const hfsplus_btree_key *);
>> int hfsplus_cat_bin_cmp_key(const hfsplus_btree_key *,
>> const hfsplus_btree_key *);
>> -void hfsplus_cat_build_key(struct super_block *sb,
>> +int hfsplus_cat_build_key(struct super_block *sb,
>> hfsplus_btree_key *, u32, struct qstr *);
>> +void hfsplus_cat_build_key_with_cnid(struct super_block *sb,
>> + hfsplus_btree_key *, u32);
>> int hfsplus_find_cat(struct super_block *, u32, struct hfs_find_data *);
>> int hfsplus_create_cat(u32, struct inode *, struct qstr *, struct inode *);
>> int hfsplus_delete_cat(u32, struct inode *, struct qstr *);
>
> grumble. Omitting the argument names from declarations makes them
> unreadable and generally useless. I mean, a bare u32?
>
> And including the names of some arguments but omitting others is
> downright bizarre.
>
> However this isn't a thing which can or should be addressed within this
> patch.

Also in hfsplus_fs.h there are:

====> snip <=====
#define hfs_btree_open hfsplus_btree_open
#define hfs_btree_close hfsplus_btree_close
#define hfs_btree_write hfsplus_btree_write
#define hfs_bmap_alloc hfsplus_bmap_alloc
#define hfs_bmap_free hfsplus_bmap_free
#define hfs_bnode_read hfsplus_bnode_read
...
====> snap <=====

Does these exist for some legacy reason or does it serve any other
purpose ?. The only usage I see is that they change function names after
pre-processing.

Thanks a lot,

Best regards,
Sougata.


\
 
 \ /
  Last update: 2014-02-25 19:41    [W:0.117 / U:0.692 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site