Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

hfsplus: remove unused routine hfsplus_attr_build_key_uni

The directory/file catalog b-tree equivalent, hfsplus_build_key_uni(),
is used by hfsplus_find_cat() for internal referencing between catalog
records. There is no corresponding usage for attributes - attribute
records do not refer to one another.

Signed-off-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Cc: Sougata Santra <sougata@tuxera.com>
Cc: Anton Altaparmakov <anton@tuxera.com>
Cc: Vyacheslav Dubeyko <slava@dubeyko.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Hin-Tak Leung and committed by
Linus Torvalds
7f2fc81e bf29e886

-28
-25
fs/hfsplus/attributes.c
··· 79 79 return 0; 80 80 } 81 81 82 - void hfsplus_attr_build_key_uni(hfsplus_btree_key *key, 83 - u32 cnid, 84 - struct hfsplus_attr_unistr *name) 85 - { 86 - int ustrlen; 87 - 88 - memset(key, 0, sizeof(struct hfsplus_attr_key)); 89 - ustrlen = be16_to_cpu(name->length); 90 - key->attr.cnid = cpu_to_be32(cnid); 91 - key->attr.key_name.length = cpu_to_be16(ustrlen); 92 - ustrlen *= 2; 93 - memcpy(key->attr.key_name.unicode, name->unicode, ustrlen); 94 - 95 - /* The length of the key, as stored in key_len field, does not include 96 - * the size of the key_len field itself. 97 - * So, offsetof(hfsplus_attr_key, key_name) is a trick because 98 - * it takes into consideration key_len field (__be16) of 99 - * hfsplus_attr_key structure instead of length field (__be16) of 100 - * hfsplus_attr_unistr structure. 101 - */ 102 - key->key_len = 103 - cpu_to_be16(offsetof(struct hfsplus_attr_key, key_name) + 104 - ustrlen); 105 - } 106 - 107 82 hfsplus_attr_entry *hfsplus_alloc_attr_entry(void) 108 83 { 109 84 return kmem_cache_alloc(hfsplus_attr_tree_cachep, GFP_KERNEL);
-3
fs/hfsplus/hfsplus_fs.h
··· 375 375 const hfsplus_btree_key *); 376 376 int hfsplus_attr_build_key(struct super_block *, hfsplus_btree_key *, 377 377 u32, const char *); 378 - void hfsplus_attr_build_key_uni(hfsplus_btree_key *key, 379 - u32 cnid, 380 - struct hfsplus_attr_unistr *name); 381 378 int hfsplus_find_attr(struct super_block *, u32, 382 379 const char *, struct hfs_find_data *); 383 380 int hfsplus_attr_exists(struct inode *inode, const char *name);