aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hfs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2016-07-20 16:22:29 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2016-07-20 23:30:06 -0400
commit71e939634de7ed6aad2978b55d131ec6f1f9aaa6 (patch)
tree7e84d4bba19ed003774e84a4ff68fe3bb412151b /fs/hfs
parentb5cce521e849c998e169820c734731a468fcf2b4 (diff)
qstr: constify instances in hfs
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/hfs')
-rw-r--r--fs/hfs/catalog.c12
-rw-r--r--fs/hfs/hfs_fs.h14
-rw-r--r--fs/hfs/inode.c2
-rw-r--r--fs/hfs/trans.c2
4 files changed, 15 insertions, 15 deletions
diff --git a/fs/hfs/catalog.c b/fs/hfs/catalog.c
index 98cde8ba5dc2..8f4afd3f5108 100644
--- a/fs/hfs/catalog.c
+++ b/fs/hfs/catalog.c
@@ -20,7 +20,7 @@
20 * 20 *
21 * Given the ID of the parent and the name build a search key. 21 * Given the ID of the parent and the name build a search key.
22 */ 22 */
23void hfs_cat_build_key(struct super_block *sb, btree_key *key, u32 parent, struct qstr *name) 23void hfs_cat_build_key(struct super_block *sb, btree_key *key, u32 parent, const struct qstr *name)
24{ 24{
25 key->cat.reserved = 0; 25 key->cat.reserved = 0;
26 key->cat.ParID = cpu_to_be32(parent); 26 key->cat.ParID = cpu_to_be32(parent);
@@ -64,7 +64,7 @@ static int hfs_cat_build_record(hfs_cat_rec *rec, u32 cnid, struct inode *inode)
64 64
65static int hfs_cat_build_thread(struct super_block *sb, 65static int hfs_cat_build_thread(struct super_block *sb,
66 hfs_cat_rec *rec, int type, 66 hfs_cat_rec *rec, int type,
67 u32 parentid, struct qstr *name) 67 u32 parentid, const struct qstr *name)
68{ 68{
69 rec->type = type; 69 rec->type = type;
70 memset(rec->thread.reserved, 0, sizeof(rec->thread.reserved)); 70 memset(rec->thread.reserved, 0, sizeof(rec->thread.reserved));
@@ -79,7 +79,7 @@ static int hfs_cat_build_thread(struct super_block *sb,
79 * Add a new file or directory to the catalog B-tree and 79 * Add a new file or directory to the catalog B-tree and
80 * return a (struct hfs_cat_entry) for it in '*result'. 80 * return a (struct hfs_cat_entry) for it in '*result'.
81 */ 81 */
82int hfs_cat_create(u32 cnid, struct inode *dir, struct qstr *str, struct inode *inode) 82int hfs_cat_create(u32 cnid, struct inode *dir, const struct qstr *str, struct inode *inode)
83{ 83{
84 struct hfs_find_data fd; 84 struct hfs_find_data fd;
85 struct super_block *sb; 85 struct super_block *sb;
@@ -210,7 +210,7 @@ int hfs_cat_find_brec(struct super_block *sb, u32 cnid,
210 * Delete the indicated file or directory. 210 * Delete the indicated file or directory.
211 * The associated thread is also removed unless ('with_thread'==0). 211 * The associated thread is also removed unless ('with_thread'==0).
212 */ 212 */
213int hfs_cat_delete(u32 cnid, struct inode *dir, struct qstr *str) 213int hfs_cat_delete(u32 cnid, struct inode *dir, const struct qstr *str)
214{ 214{
215 struct super_block *sb; 215 struct super_block *sb;
216 struct hfs_find_data fd; 216 struct hfs_find_data fd;
@@ -277,8 +277,8 @@ out:
277 * If the destination exists it is removed and a 277 * If the destination exists it is removed and a
278 * (struct hfs_cat_entry) for it is returned in '*result'. 278 * (struct hfs_cat_entry) for it is returned in '*result'.
279 */ 279 */
280int hfs_cat_move(u32 cnid, struct inode *src_dir, struct qstr *src_name, 280int hfs_cat_move(u32 cnid, struct inode *src_dir, const struct qstr *src_name,
281 struct inode *dst_dir, struct qstr *dst_name) 281 struct inode *dst_dir, const struct qstr *dst_name)
282{ 282{
283 struct super_block *sb; 283 struct super_block *sb;
284 struct hfs_find_data src_fd, dst_fd; 284 struct hfs_find_data src_fd, dst_fd;
diff --git a/fs/hfs/hfs_fs.h b/fs/hfs/hfs_fs.h
index ee2f385811c8..e799ebe71b51 100644
--- a/fs/hfs/hfs_fs.h
+++ b/fs/hfs/hfs_fs.h
@@ -178,11 +178,11 @@ extern int hfs_clear_vbm_bits(struct super_block *, u16, u16);
178extern int hfs_cat_keycmp(const btree_key *, const btree_key *); 178extern int hfs_cat_keycmp(const btree_key *, const btree_key *);
179struct hfs_find_data; 179struct hfs_find_data;
180extern int hfs_cat_find_brec(struct super_block *, u32, struct hfs_find_data *); 180extern int hfs_cat_find_brec(struct super_block *, u32, struct hfs_find_data *);
181extern int hfs_cat_create(u32, struct inode *, struct qstr *, struct inode *); 181extern int hfs_cat_create(u32, struct inode *, const struct qstr *, struct inode *);
182extern int hfs_cat_delete(u32, struct inode *, struct qstr *); 182extern int hfs_cat_delete(u32, struct inode *, const struct qstr *);
183extern int hfs_cat_move(u32, struct inode *, struct qstr *, 183extern int hfs_cat_move(u32, struct inode *, const struct qstr *,
184 struct inode *, struct qstr *); 184 struct inode *, const struct qstr *);
185extern void hfs_cat_build_key(struct super_block *, btree_key *, u32, struct qstr *); 185extern void hfs_cat_build_key(struct super_block *, btree_key *, u32, const struct qstr *);
186 186
187/* dir.c */ 187/* dir.c */
188extern const struct file_operations hfs_dir_operations; 188extern const struct file_operations hfs_dir_operations;
@@ -201,7 +201,7 @@ extern int hfs_get_block(struct inode *, sector_t, struct buffer_head *, int);
201extern const struct address_space_operations hfs_aops; 201extern const struct address_space_operations hfs_aops;
202extern const struct address_space_operations hfs_btree_aops; 202extern const struct address_space_operations hfs_btree_aops;
203 203
204extern struct inode *hfs_new_inode(struct inode *, struct qstr *, umode_t); 204extern struct inode *hfs_new_inode(struct inode *, const struct qstr *, umode_t);
205extern void hfs_inode_write_fork(struct inode *, struct hfs_extent *, __be32 *, __be32 *); 205extern void hfs_inode_write_fork(struct inode *, struct hfs_extent *, __be32 *, __be32 *);
206extern int hfs_write_inode(struct inode *, struct writeback_control *); 206extern int hfs_write_inode(struct inode *, struct writeback_control *);
207extern int hfs_inode_setattr(struct dentry *, struct iattr *); 207extern int hfs_inode_setattr(struct dentry *, struct iattr *);
@@ -237,7 +237,7 @@ extern int hfs_compare_dentry(const struct dentry *parent, const struct dentry *
237 unsigned int len, const char *str, const struct qstr *name); 237 unsigned int len, const char *str, const struct qstr *name);
238 238
239/* trans.c */ 239/* trans.c */
240extern void hfs_asc2mac(struct super_block *, struct hfs_name *, struct qstr *); 240extern void hfs_asc2mac(struct super_block *, struct hfs_name *, const struct qstr *);
241extern int hfs_mac2asc(struct super_block *, char *, const struct hfs_name *); 241extern int hfs_mac2asc(struct super_block *, char *, const struct hfs_name *);
242 242
243/* super.c */ 243/* super.c */
diff --git a/fs/hfs/inode.c b/fs/hfs/inode.c
index 8eed66af5b82..6d6affd3ba5b 100644
--- a/fs/hfs/inode.c
+++ b/fs/hfs/inode.c
@@ -177,7 +177,7 @@ const struct address_space_operations hfs_aops = {
177/* 177/*
178 * hfs_new_inode 178 * hfs_new_inode
179 */ 179 */
180struct inode *hfs_new_inode(struct inode *dir, struct qstr *name, umode_t mode) 180struct inode *hfs_new_inode(struct inode *dir, const struct qstr *name, umode_t mode)
181{ 181{
182 struct super_block *sb = dir->i_sb; 182 struct super_block *sb = dir->i_sb;
183 struct inode *inode = new_inode(sb); 183 struct inode *inode = new_inode(sb);
diff --git a/fs/hfs/trans.c b/fs/hfs/trans.c
index b1ce4c7ad3fb..39f5e343bf4d 100644
--- a/fs/hfs/trans.c
+++ b/fs/hfs/trans.c
@@ -94,7 +94,7 @@ out:
94 * This routine is a inverse to hfs_mac2triv(). 94 * This routine is a inverse to hfs_mac2triv().
95 * A ':' is replaced by a '/'. 95 * A ':' is replaced by a '/'.
96 */ 96 */
97void hfs_asc2mac(struct super_block *sb, struct hfs_name *out, struct qstr *in) 97void hfs_asc2mac(struct super_block *sb, struct hfs_name *out, const struct qstr *in)
98{ 98{
99 struct nls_table *nls_disk = HFS_SB(sb)->nls_disk; 99 struct nls_table *nls_disk = HFS_SB(sb)->nls_disk;
100 struct nls_table *nls_io = HFS_SB(sb)->nls_io; 100 struct nls_table *nls_io = HFS_SB(sb)->nls_io;