Re: [PATCH 1/1] hfsplus: fix longname handling

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

 



On 02/24/2014 11:48 PM, Andrew Morton wrote:
On Mon, 24 Feb 2014 21:28:27 +0200 Sougata Santra<sougata@xxxxxxxxxx>  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.
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux