Pull qstr constification updates from Al Viro: "Fairly self-contained bunch - surprising lot of places passes struct qstr * as an argument when const struct qstr * would suffice; it complicates analysis for no good reason. I'd prefer to feed that separately from the assorted fixes (those are in #for-linus and with somewhat trickier topology)" * 'work.const-qstr' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: qstr: constify instances in adfs qstr: constify instances in lustre qstr: constify instances in f2fs qstr: constify instances in ext2 qstr: constify instances in vfat qstr: constify instances in procfs qstr: constify instances in fuse qstr constify instances in fs/dcache.c qstr: constify instances in nfs qstr: constify instances in ocfs2 qstr: constify instances in autofs4 qstr: constify instances in hfs qstr: constify instances in hfsplus qstr: constify instances in logfs qstr: constify dentry_init_security
Unified · Split
| @@ -781,7 +781,7 @@ static int sa_args_init(struct inode *dir, struct inode *child, · 780 unmodified lines | ||
| 781 | 781 | struct ll_sa_entry *entry, struct md_enqueue_info **pmi, |
| 782 | 782 | struct ldlm_enqueue_info **pei) |
| 783 | 783 | { |
| 784 | − struct qstr *qstr = &entry->se_qstr; | |
| 784 | + const struct qstr *qstr = &entry->se_qstr; | |
| 785 | 785 | struct ll_inode_info *lli = ll_i2info(dir); |
| 786 | 786 | struct md_enqueue_info *minfo; |
| 787 | 787 | struct ldlm_enqueue_info *einfo; |
| @@ -1340,7 +1340,7 @@ enum { · 552 unmodified lines | ||
| 1340 | 1340 | static int is_first_dirent(struct inode *dir, struct dentry *dentry) |
| 1341 | 1341 | { |
| 1342 | 1342 | struct ll_dir_chain chain; |
| 1343 | − struct qstr *target = &dentry->d_name; | |
| 1343 | + const struct qstr *target = &dentry->d_name; | |
| 1344 | 1344 | struct page *page; |
| 1345 | 1345 | __u64 pos = 0; |
| 1346 | 1346 | int dot_de; |
| @@ -101,7 +101,7 @@ out: · 100 unmodified lines | ||
| 101 | 101 | } |
| 102 | 102 | |
| 103 | 103 | static int |
| 104 | −adfs_match(struct qstr *name, struct object_info *obj) | |
| 104 | +adfs_match(const struct qstr *name, struct object_info *obj) | |
| 105 | 105 | { |
| 106 | 106 | int i; |
| 107 | 107 | |
| @@ -126,7 +126,7 @@ adfs_match(struct qstr *name, struct object_info *obj) · 18 unmodified lines | ||
| 126 | 126 | } |
| 127 | 127 | |
| 128 | 128 | static int |
| 129 | −adfs_dir_lookup_byname(struct inode *inode, struct qstr *name, struct object_info *obj) | |
| 129 | +adfs_dir_lookup_byname(struct inode *inode, const struct qstr *name, struct object_info *obj) | |
| 130 | 130 | { |
| 131 | 131 | struct super_block *sb = inode->i_sb; |
| 132 | 132 | const struct adfs_dir_ops *ops = ADFS_SB(sb)->s_dir; |
| @@ -159,7 +159,7 @@ static struct dentry *autofs4_lookup_active(struct dentry *dentry) · 158 unmodified lines | ||
| 159 | 159 | { |
| 160 | 160 | struct autofs_sb_info *sbi = autofs4_sbi(dentry->d_sb); |
| 161 | 161 | struct dentry *parent = dentry->d_parent; |
| 162 | − struct qstr *name = &dentry->d_name; | |
| 162 | + const struct qstr *name = &dentry->d_name; | |
| 163 | 163 | unsigned int len = name->len; |
| 164 | 164 | unsigned int hash = name->hash; |
| 165 | 165 | const unsigned char *str = name->name; |
| @@ -172,7 +172,7 @@ static struct dentry *autofs4_lookup_active(struct dentry *dentry) · 6 unmodified lines | ||
| 172 | 172 | list_for_each(p, head) { |
| 173 | 173 | struct autofs_info *ino; |
| 174 | 174 | struct dentry *active; |
| 175 | − struct qstr *qstr; | |
| 175 | + const struct qstr *qstr; | |
| 176 | 176 | |
| 177 | 177 | ino = list_entry(p, struct autofs_info, active); |
| 178 | 178 | active = ino->dentry; |
| @@ -214,7 +214,7 @@ static struct dentry *autofs4_lookup_expiring(struct dentry *dentry, · 35 unmodified lines | ||
| 214 | 214 | { |
| 215 | 215 | struct autofs_sb_info *sbi = autofs4_sbi(dentry->d_sb); |
| 216 | 216 | struct dentry *parent = dentry->d_parent; |
| 217 | − struct qstr *name = &dentry->d_name; | |
| 217 | + const struct qstr *name = &dentry->d_name; | |
| 218 | 218 | unsigned int len = name->len; |
| 219 | 219 | unsigned int hash = name->hash; |
| 220 | 220 | const unsigned char *str = name->name; |
| @@ -227,7 +227,7 @@ static struct dentry *autofs4_lookup_expiring(struct dentry *dentry, · 6 unmodified lines | ||
| 227 | 227 | list_for_each(p, head) { |
| 228 | 228 | struct autofs_info *ino; |
| 229 | 229 | struct dentry *expiring; |
| 230 | − struct qstr *qstr; | |
| 230 | + const struct qstr *qstr; | |
| 231 | 231 | |
| 232 | 232 | if (rcu_walk) { |
| 233 | 233 | spin_unlock(&sbi->lookup_lock); |
| @@ -225,7 +225,7 @@ rename_retry: · 224 unmodified lines | ||
| 225 | 225 | } |
| 226 | 226 | |
| 227 | 227 | static struct autofs_wait_queue * |
| 228 | −autofs4_find_wait(struct autofs_sb_info *sbi, struct qstr *qstr) | |
| 228 | +autofs4_find_wait(struct autofs_sb_info *sbi, const struct qstr *qstr) | |
| 229 | 229 | { |
| 230 | 230 | struct autofs_wait_queue *wq; |
| 231 | 231 | |
| @@ -249,7 +249,7 @@ autofs4_find_wait(struct autofs_sb_info *sbi, struct qstr *qstr) · 17 unmodified lines | ||
| 249 | 249 | */ |
| 250 | 250 | static int validate_request(struct autofs_wait_queue **wait, |
| 251 | 251 | struct autofs_sb_info *sbi, |
| 252 | − struct qstr *qstr, | |
| 252 | + const struct qstr *qstr, | |
| 253 | 253 | struct dentry *dentry, enum autofs_notify notify) |
| 254 | 254 | { |
| 255 | 255 | struct autofs_wait_queue *wq; |
| @@ -2636,7 +2636,7 @@ EXPORT_SYMBOL(d_exact_alias); · 2635 unmodified lines | ||
| 2636 | 2636 | * Parent inode i_mutex must be held over d_lookup and into this call (to |
| 2637 | 2637 | * keep renames and concurrent inserts, and readdir(2) away). |
| 2638 | 2638 | */ |
| 2639 | −void dentry_update_name_case(struct dentry *dentry, struct qstr *name) | |
| 2639 | +void dentry_update_name_case(struct dentry *dentry, const struct qstr *name) | |
| 2640 | 2640 | { |
| 2641 | 2641 | BUG_ON(!inode_is_locked(dentry->d_parent->d_inode)); |
| 2642 | 2642 | BUG_ON(dentry->d_name.len != name->len); /* d_lookup gives this */ |
| @@ -3038,7 +3038,7 @@ static int prepend(char **buffer, int *buflen, const char *str, int namelen) · 395 unmodified lines | ||
| 3038 | 3038 | * Data dependency barrier is needed to make sure that we see that terminating |
| 3039 | 3039 | * NUL. Alpha strikes again, film at 11... |
| 3040 | 3040 | */ |
| 3041 | −static int prepend_name(char **buffer, int *buflen, struct qstr *name) | |
| 3041 | +static int prepend_name(char **buffer, int *buflen, const struct qstr *name) | |
| 3042 | 3042 | { |
| 3043 | 3043 | const char *dname = ACCESS_ONCE(name->name); |
| 3044 | 3044 | u32 dlen = ACCESS_ONCE(name->len); |
| @@ -358,8 +358,8 @@ ext2_readdir(struct file *file, struct dir_context *ctx) · 357 unmodified lines | ||
| 358 | 358 | * and the entry itself. Page is returned mapped and unlocked. |
| 359 | 359 | * Entry is guaranteed to be valid. |
| 360 | 360 | */ |
| 361 | −struct ext2_dir_entry_2 *ext2_find_entry (struct inode * dir, | |
| 362 | − struct qstr *child, struct page ** res_page) | |
| 361 | +struct ext2_dir_entry_2 *ext2_find_entry (struct inode *dir, | |
| 362 | + const struct qstr *child, struct page **res_page) | |
| 363 | 363 | { |
| 364 | 364 | const char *name = child->name; |
| 365 | 365 | int namelen = child->len; |
| @@ -435,7 +435,7 @@ struct ext2_dir_entry_2 * ext2_dotdot (struct inode *dir, struct page **p) · 69 unmodified lines | ||
| 435 | 435 | return de; |
| 436 | 436 | } |
| 437 | 437 | |
| 438 | −ino_t ext2_inode_by_name(struct inode *dir, struct qstr *child) | |
| 438 | +ino_t ext2_inode_by_name(struct inode *dir, const struct qstr *child) | |
| 439 | 439 | { |
| 440 | 440 | ino_t res = 0; |
| 441 | 441 | struct ext2_dir_entry_2 *de; |
| @@ -757,9 +757,9 @@ extern void ext2_rsv_window_add(struct super_block *sb, struct ext2_reserve_wind · 756 unmodified lines | ||
| 757 | 757 | |
| 758 | 758 | /* dir.c */ |
| 759 | 759 | extern int ext2_add_link (struct dentry *, struct inode *); |
| 760 | −extern ino_t ext2_inode_by_name(struct inode *, struct qstr *); | |
| 760 | +extern ino_t ext2_inode_by_name(struct inode *, const struct qstr *); | |
| 761 | 761 | extern int ext2_make_empty(struct inode *, struct inode *); |
| 762 | −extern struct ext2_dir_entry_2 * ext2_find_entry (struct inode *,struct qstr *, struct page **); | |
| 762 | +extern struct ext2_dir_entry_2 * ext2_find_entry (struct inode *,const struct qstr *, struct page **); | |
| 763 | 763 | extern int ext2_delete_entry (struct ext2_dir_entry_2 *, struct page *); |
| 764 | 764 | extern int ext2_empty_dir (struct inode *); |
| 765 | 765 | extern struct ext2_dir_entry_2 * ext2_dotdot (struct inode *, struct page **); |
| @@ -219,7 +219,7 @@ static struct f2fs_dir_entry *find_in_level(struct inode *dir, · 218 unmodified lines | ||
| 219 | 219 | * Entry is guaranteed to be valid. |
| 220 | 220 | */ |
| 221 | 221 | struct f2fs_dir_entry *f2fs_find_entry(struct inode *dir, |
| 222 | − struct qstr *child, struct page **res_page) | |
| 222 | + const struct qstr *child, struct page **res_page) | |
| 223 | 223 | { |
| 224 | 224 | unsigned long npages = dir_blocks(dir); |
| 225 | 225 | struct f2fs_dir_entry *de = NULL; |
| @@ -272,7 +272,7 @@ struct f2fs_dir_entry *f2fs_parent_dir(struct inode *dir, struct page **p) · 46 unmodified lines | ||
| 272 | 272 | return f2fs_find_entry(dir, &dotdot, p); |
| 273 | 273 | } |
| 274 | 274 | |
| 275 | −ino_t f2fs_inode_by_name(struct inode *dir, struct qstr *qstr, | |
| 275 | +ino_t f2fs_inode_by_name(struct inode *dir, const struct qstr *qstr, | |
| 276 | 276 | struct page **page) |
| 277 | 277 | { |
| 278 | 278 | ino_t res = 0; |
| @@ -1914,10 +1914,10 @@ struct page *init_inode_metadata(struct inode *, struct inode *, · 1913 unmodified lines | ||
| 1914 | 1914 | void update_parent_metadata(struct inode *, struct inode *, unsigned int); |
| 1915 | 1915 | int room_for_filename(const void *, int, int); |
| 1916 | 1916 | void f2fs_drop_nlink(struct inode *, struct inode *); |
| 1917 | −struct f2fs_dir_entry *f2fs_find_entry(struct inode *, struct qstr *, | |
| 1917 | +struct f2fs_dir_entry *f2fs_find_entry(struct inode *, const struct qstr *, | |
| 1918 | 1918 | struct page **); |
| 1919 | 1919 | struct f2fs_dir_entry *f2fs_parent_dir(struct inode *, struct page **); |
| 1920 | −ino_t f2fs_inode_by_name(struct inode *, struct qstr *, struct page **); | |
| 1920 | +ino_t f2fs_inode_by_name(struct inode *, const struct qstr *, struct page **); | |
| 1921 | 1921 | void f2fs_set_link(struct inode *, struct f2fs_dir_entry *, |
| 1922 | 1922 | struct page *, struct inode *); |
| 1923 | 1923 | int update_dent_inode(struct inode *, struct inode *, const struct qstr *); |
| @@ -652,8 +652,8 @@ out_free: · 651 unmodified lines | ||
| 652 | 652 | return err; |
| 653 | 653 | } |
| 654 | 654 | |
| 655 | −static int vfat_add_entry(struct inode *dir, struct qstr *qname, int is_dir, | |
| 656 | − int cluster, struct timespec *ts, | |
| 655 | +static int vfat_add_entry(struct inode *dir, const struct qstr *qname, | |
| 656 | + int is_dir, int cluster, struct timespec *ts, | |
| 657 | 657 | struct fat_slot_info *sinfo) |
| 658 | 658 | { |
| 659 | 659 | struct msdos_dir_slot *slots; |
| @@ -688,7 +688,7 @@ cleanup: · 28 unmodified lines | ||
| 688 | 688 | return err; |
| 689 | 689 | } |
| 690 | 690 | |
| 691 | −static int vfat_find(struct inode *dir, struct qstr *qname, | |
| 691 | +static int vfat_find(struct inode *dir, const struct qstr *qname, | |
| 692 | 692 | struct fat_slot_info *sinfo) |
| 693 | 693 | { |
| 694 | 694 | unsigned int len = vfat_striptail_len(qname); |
| @@ -146,7 +146,7 @@ static void fuse_invalidate_entry(struct dentry *entry) · 145 unmodified lines | ||
| 146 | 146 | } |
| 147 | 147 | |
| 148 | 148 | static void fuse_lookup_init(struct fuse_conn *fc, struct fuse_args *args, |
| 149 | − u64 nodeid, struct qstr *name, | |
| 149 | + u64 nodeid, const struct qstr *name, | |
| 150 | 150 | struct fuse_entry_out *outarg) |
| 151 | 151 | { |
| 152 | 152 | memset(outarg, 0, sizeof(struct fuse_entry_out)); |
| @@ -282,7 +282,7 @@ int fuse_valid_type(int m) · 129 unmodified lines | ||
| 282 | 282 | S_ISBLK(m) || S_ISFIFO(m) || S_ISSOCK(m); |
| 283 | 283 | } |
| 284 | 284 | |
| 285 | −int fuse_lookup_name(struct super_block *sb, u64 nodeid, struct qstr *name, | |
| 285 | +int fuse_lookup_name(struct super_block *sb, u64 nodeid, const struct qstr *name, | |
| 286 | 286 | struct fuse_entry_out *outarg, struct inode **inode) |
| 287 | 287 | { |
| 288 | 288 | struct fuse_conn *fc = get_fuse_conn_super(sb); |
| @@ -704,7 +704,7 @@ struct inode *fuse_iget(struct super_block *sb, u64 nodeid, · 703 unmodified lines | ||
| 704 | 704 | int generation, struct fuse_attr *attr, |
| 705 | 705 | u64 attr_valid, u64 attr_version); |
| 706 | 706 | |
| 707 | −int fuse_lookup_name(struct super_block *sb, u64 nodeid, struct qstr *name, | |
| 707 | +int fuse_lookup_name(struct super_block *sb, u64 nodeid, const struct qstr *name, | |
| 708 | 708 | struct fuse_entry_out *outarg, struct inode **inode); |
| 709 | 709 | |
| 710 | 710 | /** |
| @@ -673,13 +673,11 @@ static struct dentry *fuse_get_dentry(struct super_block *sb, · 672 unmodified lines | ||
| 673 | 673 | inode = ilookup5(sb, handle->nodeid, fuse_inode_eq, &handle->nodeid); |
| 674 | 674 | if (!inode) { |
| 675 | 675 | struct fuse_entry_out outarg; |
| 676 | − struct qstr name; | |
| 676 | + const struct qstr name = QSTR_INIT(".", 1); | |
| 677 | 677 | |
| 678 | 678 | if (!fc->export_support) |
| 679 | 679 | goto out_err; |
| 680 | 680 | |
| 681 | − name.len = 1; | |
| 682 | − name.name = "."; | |
| 683 | 681 | err = fuse_lookup_name(sb, handle->nodeid, &name, &outarg, |
| 684 | 682 | &inode); |
| 685 | 683 | if (err && err != -ENOENT) |
| @@ -775,14 +773,12 @@ static struct dentry *fuse_get_parent(struct dentry *child) · 89 unmodified lines | ||
| 775 | 773 | struct inode *inode; |
| 776 | 774 | struct dentry *parent; |
| 777 | 775 | struct fuse_entry_out outarg; |
| 778 | − struct qstr name; | |
| 776 | + const struct qstr name = QSTR_INIT("..", 2); | |
| 779 | 777 | int err; |
| 780 | 778 | |
| 781 | 779 | if (!fc->export_support) |
| 782 | 780 | return ERR_PTR(-ESTALE); |
| 783 | 781 | |
| 784 | − name.len = 2; | |
| 785 | − name.name = ".."; | |
| 786 | 782 | err = fuse_lookup_name(child_inode->i_sb, get_node_id(child_inode), |
| 787 | 783 | &name, &outarg, &inode); |
| 788 | 784 | if (err) { |
| @@ -20,7 +20,7 @@ · 19 unmodified lines | ||
| 20 | 20 | * |
| 21 | 21 | * Given the ID of the parent and the name build a search key. |
| 22 | 22 | */ |
| 23 | −void hfs_cat_build_key(struct super_block *sb, btree_key *key, u32 parent, struct qstr *name) | |
| 23 | +void hfs_cat_build_key(struct super_block *sb, btree_key *key, u32 parent, const struct qstr *name) | |
| 24 | 24 | { |
| 25 | 25 | key->cat.reserved = 0; |
| 26 | 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) · 37 unmodified lines | ||
| 64 | 64 | |
| 65 | 65 | static int hfs_cat_build_thread(struct super_block *sb, |
| 66 | 66 | hfs_cat_rec *rec, int type, |
| 67 | − u32 parentid, struct qstr *name) | |
| 67 | + u32 parentid, const struct qstr *name) | |
| 68 | 68 | { |
| 69 | 69 | rec->type = type; |
| 70 | 70 | memset(rec->thread.reserved, 0, sizeof(rec->thread.reserved)); |
| @@ -79,7 +79,7 @@ static int hfs_cat_build_thread(struct super_block *sb, · 8 unmodified lines | ||
| 79 | 79 | * Add a new file or directory to the catalog B-tree and |
| 80 | 80 | * return a (struct hfs_cat_entry) for it in '*result'. |
| 81 | 81 | */ |
| 82 | −int hfs_cat_create(u32 cnid, struct inode *dir, struct qstr *str, struct inode *inode) | |
| 82 | +int hfs_cat_create(u32 cnid, struct inode *dir, const struct qstr *str, struct inode *inode) | |
| 83 | 83 | { |
| 84 | 84 | struct hfs_find_data fd; |
| 85 | 85 | struct super_block *sb; |
| @@ -210,7 +210,7 @@ int hfs_cat_find_brec(struct super_block *sb, u32 cnid, · 124 unmodified lines | ||
| 210 | 210 | * Delete the indicated file or directory. |
| 211 | 211 | * The associated thread is also removed unless ('with_thread'==0). |
| 212 | 212 | */ |
| 213 | −int hfs_cat_delete(u32 cnid, struct inode *dir, struct qstr *str) | |
| 213 | +int hfs_cat_delete(u32 cnid, struct inode *dir, const struct qstr *str) | |
| 214 | 214 | { |
| 215 | 215 | struct super_block *sb; |
| 216 | 216 | struct hfs_find_data fd; |
| @@ -277,8 +277,8 @@ out: · 60 unmodified lines | ||
| 277 | 277 | * If the destination exists it is removed and a |
| 278 | 278 | * (struct hfs_cat_entry) for it is returned in '*result'. |
| 279 | 279 | */ |
| 280 | −int hfs_cat_move(u32 cnid, struct inode *src_dir, struct qstr *src_name, | |
| 281 | − struct inode *dst_dir, struct qstr *dst_name) | |
| 280 | +int hfs_cat_move(u32 cnid, struct inode *src_dir, const struct qstr *src_name, | |
| 281 | + struct inode *dst_dir, const struct qstr *dst_name) | |
| 282 | 282 | { |
| 283 | 283 | struct super_block *sb; |
| 284 | 284 | struct hfs_find_data src_fd, dst_fd; |
| @@ -178,11 +178,11 @@ extern int hfs_clear_vbm_bits(struct super_block *, u16, u16); · 177 unmodified lines | ||
| 178 | 178 | extern int hfs_cat_keycmp(const btree_key *, const btree_key *); |
| 179 | 179 | struct hfs_find_data; |
| 180 | 180 | extern int hfs_cat_find_brec(struct super_block *, u32, struct hfs_find_data *); |
| 181 | −extern int hfs_cat_create(u32, struct inode *, struct qstr *, struct inode *); | |
| 182 | −extern int hfs_cat_delete(u32, struct inode *, struct qstr *); | |
| 183 | −extern int hfs_cat_move(u32, struct inode *, struct qstr *, | |
| 184 | − struct inode *, struct qstr *); | |
| 185 | −extern void hfs_cat_build_key(struct super_block *, btree_key *, u32, struct qstr *); | |
| 181 | +extern int hfs_cat_create(u32, struct inode *, const struct qstr *, struct inode *); | |
| 182 | +extern int hfs_cat_delete(u32, struct inode *, const struct qstr *); | |
| 183 | +extern int hfs_cat_move(u32, struct inode *, const struct qstr *, | |
| 184 | + struct inode *, const struct qstr *); | |
| 185 | +extern void hfs_cat_build_key(struct super_block *, btree_key *, u32, const struct qstr *); | |
| 186 | 186 | |
| 187 | 187 | /* dir.c */ |
| 188 | 188 | extern const struct file_operations hfs_dir_operations; |
| @@ -201,7 +201,7 @@ extern int hfs_get_block(struct inode *, sector_t, struct buffer_head *, int); · 12 unmodified lines | ||
| 201 | 201 | extern const struct address_space_operations hfs_aops; |
| 202 | 202 | extern const struct address_space_operations hfs_btree_aops; |
| 203 | 203 | |
| 204 | −extern struct inode *hfs_new_inode(struct inode *, struct qstr *, umode_t); | |
| 204 | +extern struct inode *hfs_new_inode(struct inode *, const struct qstr *, umode_t); | |
| 205 | 205 | extern void hfs_inode_write_fork(struct inode *, struct hfs_extent *, __be32 *, __be32 *); |
| 206 | 206 | extern int hfs_write_inode(struct inode *, struct writeback_control *); |
| 207 | 207 | extern int hfs_inode_setattr(struct dentry *, struct iattr *); |
| @@ -237,7 +237,7 @@ extern int hfs_compare_dentry(const struct dentry *parent, const struct dentry * · 29 unmodified lines | ||
| 237 | 237 | unsigned int len, const char *str, const struct qstr *name); |
| 238 | 238 | |
| 239 | 239 | /* trans.c */ |
| 240 | −extern void hfs_asc2mac(struct super_block *, struct hfs_name *, struct qstr *); | |
| 240 | +extern void hfs_asc2mac(struct super_block *, struct hfs_name *, const struct qstr *); | |
| 241 | 241 | extern int hfs_mac2asc(struct super_block *, char *, const struct hfs_name *); |
| 242 | 242 | |
| 243 | 243 | /* super.c */ |
| @@ -177,7 +177,7 @@ const struct address_space_operations hfs_aops = { · 176 unmodified lines | ||
| 177 | 177 | /* |
| 178 | 178 | * hfs_new_inode |
| 179 | 179 | */ |
| 180 | −struct inode *hfs_new_inode(struct inode *dir, struct qstr *name, umode_t mode) | |
| 180 | +struct inode *hfs_new_inode(struct inode *dir, const struct qstr *name, umode_t mode) | |
| 181 | 181 | { |
| 182 | 182 | struct super_block *sb = dir->i_sb; |
| 183 | 183 | struct inode *inode = new_inode(sb); |
| @@ -94,7 +94,7 @@ out: · 93 unmodified lines | ||
| 94 | 94 | * This routine is a inverse to hfs_mac2triv(). |
| 95 | 95 | * A ':' is replaced by a '/'. |
| 96 | 96 | */ |
| 97 | −void hfs_asc2mac(struct super_block *sb, struct hfs_name *out, struct qstr *in) | |
| 97 | +void hfs_asc2mac(struct super_block *sb, struct hfs_name *out, const struct qstr *in) | |
| 98 | 98 | { |
| 99 | 99 | struct nls_table *nls_disk = HFS_SB(sb)->nls_disk; |
| 100 | 100 | struct nls_table *nls_io = HFS_SB(sb)->nls_io; |
| @@ -40,7 +40,7 @@ int hfsplus_cat_bin_cmp_key(const hfsplus_btree_key *k1, · 39 unmodified lines | ||
| 40 | 40 | |
| 41 | 41 | /* Generates key for catalog file/folders record. */ |
| 42 | 42 | int hfsplus_cat_build_key(struct super_block *sb, |
| 43 | − hfsplus_btree_key *key, u32 parent, struct qstr *str) | |
| 43 | + hfsplus_btree_key *key, u32 parent, const struct qstr *str) | |
| 44 | 44 | { |
| 45 | 45 | int len, err; |
| 46 | 46 | |
| @@ -174,7 +174,7 @@ static int hfsplus_cat_build_record(hfsplus_cat_entry *entry, · 127 unmodified lines | ||
| 174 | 174 | |
| 175 | 175 | static int hfsplus_fill_cat_thread(struct super_block *sb, |
| 176 | 176 | hfsplus_cat_entry *entry, int type, |
| 177 | − u32 parentid, struct qstr *str) | |
| 177 | + u32 parentid, const struct qstr *str) | |
| 178 | 178 | { |
| 179 | 179 | int err; |
| 180 | 180 | |
| @@ -250,7 +250,7 @@ static void hfsplus_subfolders_dec(struct inode *dir) · 69 unmodified lines | ||
| 250 | 250 | } |
| 251 | 251 | |
| 252 | 252 | int hfsplus_create_cat(u32 cnid, struct inode *dir, |
| 253 | − struct qstr *str, struct inode *inode) | |
| 253 | + const struct qstr *str, struct inode *inode) | |
| 254 | 254 | { |
| 255 | 255 | struct super_block *sb = dir->i_sb; |
| 256 | 256 | struct hfs_find_data fd; |
| @@ -318,7 +318,7 @@ err2: · 61 unmodified lines | ||
| 318 | 318 | return err; |
| 319 | 319 | } |
| 320 | 320 | |
| 321 | −int hfsplus_delete_cat(u32 cnid, struct inode *dir, struct qstr *str) | |
| 321 | +int hfsplus_delete_cat(u32 cnid, struct inode *dir, const struct qstr *str) | |
| 322 | 322 | { |
| 323 | 323 | struct super_block *sb = dir->i_sb; |
| 324 | 324 | struct hfs_find_data fd; |
| @@ -415,8 +415,8 @@ out: · 90 unmodified lines | ||
| 415 | 415 | } |
| 416 | 416 | |
| 417 | 417 | int hfsplus_rename_cat(u32 cnid, |
| 418 | − struct inode *src_dir, struct qstr *src_name, | |
| 419 | − struct inode *dst_dir, struct qstr *dst_name) | |
| 418 | + struct inode *src_dir, const struct qstr *src_name, | |
| 419 | + struct inode *dst_dir, const struct qstr *dst_name) | |
| 420 | 420 | { |
| 421 | 421 | struct super_block *sb = src_dir->i_sb; |
| 422 | 422 | struct hfs_find_data src_fd, dst_fd; |
| @@ -445,17 +445,17 @@ int hfsplus_cat_case_cmp_key(const hfsplus_btree_key *k1, · 444 unmodified lines | ||
| 445 | 445 | int hfsplus_cat_bin_cmp_key(const hfsplus_btree_key *k1, |
| 446 | 446 | const hfsplus_btree_key *k2); |
| 447 | 447 | int hfsplus_cat_build_key(struct super_block *sb, hfsplus_btree_key *key, |
| 448 | − u32 parent, struct qstr *str); | |
| 448 | + u32 parent, const struct qstr *str); | |
| 449 | 449 | void hfsplus_cat_build_key_with_cnid(struct super_block *sb, |
| 450 | 450 | hfsplus_btree_key *key, u32 parent); |
| 451 | 451 | void hfsplus_cat_set_perms(struct inode *inode, struct hfsplus_perm *perms); |
| 452 | 452 | int hfsplus_find_cat(struct super_block *sb, u32 cnid, |
| 453 | 453 | struct hfs_find_data *fd); |
| 454 | −int hfsplus_create_cat(u32 cnid, struct inode *dir, struct qstr *str, | |
| 454 | +int hfsplus_create_cat(u32 cnid, struct inode *dir, const struct qstr *str, | |
| 455 | 455 | struct inode *inode); |
| 456 | −int hfsplus_delete_cat(u32 cnid, struct inode *dir, struct qstr *str); | |
| 457 | −int hfsplus_rename_cat(u32 cnid, struct inode *src_dir, struct qstr *src_name, | |
| 458 | − struct inode *dst_dir, struct qstr *dst_name); | |
| 456 | +int hfsplus_delete_cat(u32 cnid, struct inode *dir, const struct qstr *str); | |
| 457 | +int hfsplus_rename_cat(u32 cnid, struct inode *src_dir, const struct qstr *src_name, | |
| 458 | + struct inode *dst_dir, const struct qstr *dst_name); | |
| 459 | 459 | |
| 460 | 460 | /* dir.c */ |
| 461 | 461 | extern const struct inode_operations hfsplus_dir_inode_operations; |
| @@ -156,7 +156,7 @@ static pgoff_t hash_index(u32 hash, int round) · 155 unmodified lines | ||
| 156 | 156 | |
| 157 | 157 | static struct page *logfs_get_dd_page(struct inode *dir, struct dentry *dentry) |
| 158 | 158 | { |
| 159 | − struct qstr *name = &dentry->d_name; | |
| 159 | + const struct qstr *name = &dentry->d_name; | |
| 160 | 160 | struct page *page; |
| 161 | 161 | struct logfs_disk_dentry *dd; |
| 162 | 162 | u32 hash = logfs_hash_32(name->name, name->len, 0); |
| @@ -323,7 +323,7 @@ static int logfs_readdir(struct file *file, struct dir_context *ctx) · 160 unmodified lines | ||
| 323 | 323 | return 0; |
| 324 | 324 | } |
| 325 | 325 | |
| 326 | −static void logfs_set_name(struct logfs_disk_dentry *dd, struct qstr *name) | |
| 326 | +static void logfs_set_name(struct logfs_disk_dentry *dd, const struct qstr *name) | |
| 327 | 327 | { |
| 328 | 328 | dd->namelen = cpu_to_be16(name->len); |
| 329 | 329 | memcpy(dd->name, name->name, name->len); |
| @@ -144,7 +144,7 @@ nfs3_proc_setattr(struct dentry *dentry, struct nfs_fattr *fattr, · 143 unmodified lines | ||
| 144 | 144 | } |
| 145 | 145 | |
| 146 | 146 | static int |
| 147 | −nfs3_proc_lookup(struct inode *dir, struct qstr *name, | |
| 147 | +nfs3_proc_lookup(struct inode *dir, const struct qstr *name, | |
| 148 | 148 | struct nfs_fh *fhandle, struct nfs_fattr *fattr, |
| 149 | 149 | struct nfs4_label *label) |
| 150 | 150 | { |
| @@ -404,7 +404,7 @@ out: · 253 unmodified lines | ||
| 404 | 404 | } |
| 405 | 405 | |
| 406 | 406 | static int |
| 407 | −nfs3_proc_remove(struct inode *dir, struct qstr *name) | |
| 407 | +nfs3_proc_remove(struct inode *dir, const struct qstr *name) | |
| 408 | 408 | { |
| 409 | 409 | struct nfs_removeargs arg = { |
| 410 | 410 | .fh = NFS_FH(dir), |
| @@ -480,7 +480,7 @@ nfs3_proc_rename_done(struct rpc_task *task, struct inode *old_dir, · 69 unmodified lines | ||
| 480 | 480 | } |
| 481 | 481 | |
| 482 | 482 | static int |
| 483 | −nfs3_proc_link(struct inode *inode, struct inode *dir, struct qstr *name) | |
| 483 | +nfs3_proc_link(struct inode *inode, struct inode *dir, const struct qstr *name) | |
| 484 | 484 | { |
| 485 | 485 | struct nfs3_linkargs arg = { |
| 486 | 486 | .fromfh = NFS_FH(inode), |
| @@ -582,7 +582,7 @@ out: · 95 unmodified lines | ||
| 582 | 582 | } |
| 583 | 583 | |
| 584 | 584 | static int |
| 585 | −nfs3_proc_rmdir(struct inode *dir, struct qstr *name) | |
| 585 | +nfs3_proc_rmdir(struct inode *dir, const struct qstr *name) | |
| 586 | 586 | { |
| 587 | 587 | struct nfs_fattr *dir_attr; |
| 588 | 588 | struct nfs3_diropargs arg = { |
| @@ -225,7 +225,8 @@ int nfs_atomic_open(struct inode *, struct dentry *, struct file *, · 224 unmodified lines | ||
| 225 | 225 | extern struct file_system_type nfs4_fs_type; |
| 226 | 226 | |
| 227 | 227 | /* nfs4namespace.c */ |
| 228 | −struct rpc_clnt *nfs4_negotiate_security(struct rpc_clnt *, struct inode *, struct qstr *); | |
| 228 | +struct rpc_clnt *nfs4_negotiate_security(struct rpc_clnt *, struct inode *, | |
| 229 | + const struct qstr *); | |
| 229 | 230 | struct vfsmount *nfs4_submount(struct nfs_server *, struct dentry *, |
| 230 | 231 | struct nfs_fh *, struct nfs_fattr *); |
| 231 | 232 | int nfs4_replace_transport(struct nfs_server *server, |
| @@ -252,7 +253,7 @@ extern int nfs4_proc_fs_locations(struct rpc_clnt *, struct inode *, const struc · 20 unmodified lines | ||
| 252 | 253 | extern int nfs4_proc_get_locations(struct inode *, struct nfs4_fs_locations *, |
| 253 | 254 | struct page *page, struct rpc_cred *); |
| 254 | 255 | extern int nfs4_proc_fsid_present(struct inode *, struct rpc_cred *); |
| 255 | −extern struct rpc_clnt *nfs4_proc_lookup_mountpoint(struct inode *, struct qstr *, | |
| 256 | +extern struct rpc_clnt *nfs4_proc_lookup_mountpoint(struct inode *, const struct qstr *, | |
| 256 | 257 | struct nfs_fh *, struct nfs_fattr *); |
| 257 | 258 | extern int nfs4_proc_secinfo(struct inode *, const struct qstr *, struct nfs4_secinfo_flavors *); |
| 258 | 259 | extern const struct xattr_handler *nfs4_xattr_handlers[]; |
| @@ -208,7 +208,7 @@ static struct rpc_clnt *nfs_find_best_sec(struct rpc_clnt *clnt, · 207 unmodified lines | ||
| 208 | 208 | */ |
| 209 | 209 | struct rpc_clnt * |
| 210 | 210 | nfs4_negotiate_security(struct rpc_clnt *clnt, struct inode *inode, |
| 211 | − struct qstr *name) | |
| 211 | + const struct qstr *name) | |
| 212 | 212 | { |
| 213 | 213 | struct page *page; |
| 214 | 214 | struct nfs4_secinfo_flavors *flavors; |
| @@ -397,7 +397,7 @@ struct vfsmount *nfs4_submount(struct nfs_server *server, struct dentry *dentry, · 182 unmodified lines | ||
| 397 | 397 | rpc_authflavor_t flavor = server->client->cl_auth->au_flavor; |
| 398 | 398 | struct dentry *parent = dget_parent(dentry); |
| 399 | 399 | struct inode *dir = d_inode(parent); |
| 400 | − struct qstr *name = &dentry->d_name; | |
| 400 | + const struct qstr *name = &dentry->d_name; | |
| 401 | 401 | struct rpc_clnt *client; |
| 402 | 402 | struct vfsmount *mnt; |
| 403 | 403 | |
| @@ -3538,7 +3538,7 @@ static void nfs_fixup_secinfo_attributes(struct nfs_fattr *fattr) · 3537 unmodified lines | ||
| 3538 | 3538 | } |
| 3539 | 3539 | |
| 3540 | 3540 | static int nfs4_proc_lookup_common(struct rpc_clnt **clnt, struct inode *dir, |
| 3541 | − struct qstr *name, struct nfs_fh *fhandle, | |
| 3541 | + const struct qstr *name, struct nfs_fh *fhandle, | |
| 3542 | 3542 | struct nfs_fattr *fattr, struct nfs4_label *label) |
| 3543 | 3543 | { |
| 3544 | 3544 | struct nfs4_exception exception = { }; |
| @@ -3580,7 +3580,7 @@ out: · 35 unmodified lines | ||
| 3580 | 3580 | return err; |
| 3581 | 3581 | } |
| 3582 | 3582 | |
| 3583 | −static int nfs4_proc_lookup(struct inode *dir, struct qstr *name, | |
| 3583 | +static int nfs4_proc_lookup(struct inode *dir, const struct qstr *name, | |
| 3584 | 3584 | struct nfs_fh *fhandle, struct nfs_fattr *fattr, |
| 3585 | 3585 | struct nfs4_label *label) |
| 3586 | 3586 | { |
| @@ -3596,7 +3596,7 @@ static int nfs4_proc_lookup(struct inode *dir, struct qstr *name, · 9 unmodified lines | ||
| 3596 | 3596 | } |
| 3597 | 3597 | |
| 3598 | 3598 | struct rpc_clnt * |
| 3599 | −nfs4_proc_lookup_mountpoint(struct inode *dir, struct qstr *name, | |
| 3599 | +nfs4_proc_lookup_mountpoint(struct inode *dir, const struct qstr *name, | |
| 3600 | 3600 | struct nfs_fh *fhandle, struct nfs_fattr *fattr) |
| 3601 | 3601 | { |
| 3602 | 3602 | struct rpc_clnt *client = NFS_CLIENT(dir); |
| @@ -3755,7 +3755,7 @@ out: · 152 unmodified lines | ||
| 3755 | 3755 | return status; |
| 3756 | 3756 | } |
| 3757 | 3757 | |
| 3758 | −static int _nfs4_proc_remove(struct inode *dir, struct qstr *name) | |
| 3758 | +static int _nfs4_proc_remove(struct inode *dir, const struct qstr *name) | |
| 3759 | 3759 | { |
| 3760 | 3760 | struct nfs_server *server = NFS_SERVER(dir); |
| 3761 | 3761 | struct nfs_removeargs args = { |
| @@ -3778,7 +3778,7 @@ static int _nfs4_proc_remove(struct inode *dir, struct qstr *name) · 16 unmodified lines | ||
| 3778 | 3778 | return status; |
| 3779 | 3779 | } |
| 3780 | 3780 | |
| 3781 | −static int nfs4_proc_remove(struct inode *dir, struct qstr *name) | |
| 3781 | +static int nfs4_proc_remove(struct inode *dir, const struct qstr *name) | |
| 3782 | 3782 | { |
| 3783 | 3783 | struct nfs4_exception exception = { }; |
| 3784 | 3784 | int err; |
| @@ -3861,7 +3861,7 @@ static int nfs4_proc_rename_done(struct rpc_task *task, struct inode *old_dir, · 76 unmodified lines | ||
| 3861 | 3861 | return 1; |
| 3862 | 3862 | } |
| 3863 | 3863 | |
| 3864 | −static int _nfs4_proc_link(struct inode *inode, struct inode *dir, struct qstr *name) | |
| 3864 | +static int _nfs4_proc_link(struct inode *inode, struct inode *dir, const struct qstr *name) | |
| 3865 | 3865 | { |
| 3866 | 3866 | struct nfs_server *server = NFS_SERVER(inode); |
| 3867 | 3867 | struct nfs4_link_arg arg = { |
| @@ -3908,7 +3908,7 @@ out: · 40 unmodified lines | ||
| 3908 | 3908 | return status; |
| 3909 | 3909 | } |
| 3910 | 3910 | |
| 3911 | −static int nfs4_proc_link(struct inode *inode, struct inode *dir, struct qstr *name) | |
| 3911 | +static int nfs4_proc_link(struct inode *inode, struct inode *dir, const struct qstr *name) | |
| 3912 | 3912 | { |
| 3913 | 3913 | struct nfs4_exception exception = { }; |
| 3914 | 3914 | int err; |
| @@ -3930,7 +3930,7 @@ struct nfs4_createdata { · 15 unmodified lines | ||
| 3930 | 3930 | }; |
| 3931 | 3931 | |
| 3932 | 3932 | static struct nfs4_createdata *nfs4_alloc_createdata(struct inode *dir, |
| 3933 | − struct qstr *name, struct iattr *sattr, u32 ftype) | |
| 3933 | + const struct qstr *name, struct iattr *sattr, u32 ftype) | |
| 3934 | 3934 | { |
| 3935 | 3935 | struct nfs4_createdata *data; |
| 3936 | 3936 | |
| @@ -145,7 +145,7 @@ nfs_proc_setattr(struct dentry *dentry, struct nfs_fattr *fattr, · 144 unmodified lines | ||
| 145 | 145 | } |
| 146 | 146 | |
| 147 | 147 | static int |
| 148 | −nfs_proc_lookup(struct inode *dir, struct qstr *name, | |
| 148 | +nfs_proc_lookup(struct inode *dir, const struct qstr *name, | |
| 149 | 149 | struct nfs_fh *fhandle, struct nfs_fattr *fattr, |
| 150 | 150 | struct nfs4_label *label) |
| 151 | 151 | { |
| @@ -299,7 +299,7 @@ out: · 147 unmodified lines | ||
| 299 | 299 | } |
| 300 | 300 | |
| 301 | 301 | static int |
| 302 | −nfs_proc_remove(struct inode *dir, struct qstr *name) | |
| 302 | +nfs_proc_remove(struct inode *dir, const struct qstr *name) | |
| 303 | 303 | { |
| 304 | 304 | struct nfs_removeargs arg = { |
| 305 | 305 | .fh = NFS_FH(dir), |
| @@ -357,7 +357,7 @@ nfs_proc_rename_done(struct rpc_task *task, struct inode *old_dir, · 51 unmodified lines | ||
| 357 | 357 | } |
| 358 | 358 | |
| 359 | 359 | static int |
| 360 | −nfs_proc_link(struct inode *inode, struct inode *dir, struct qstr *name) | |
| 360 | +nfs_proc_link(struct inode *inode, struct inode *dir, const struct qstr *name) | |
| 361 | 361 | { |
| 362 | 362 | struct nfs_linkargs arg = { |
| 363 | 363 | .fromfh = NFS_FH(inode), |
| @@ -456,7 +456,7 @@ out: · 92 unmodified lines | ||
| 456 | 456 | } |
| 457 | 457 | |
| 458 | 458 | static int |
| 459 | −nfs_proc_rmdir(struct inode *dir, struct qstr *name) | |
| 459 | +nfs_proc_rmdir(struct inode *dir, const struct qstr *name) | |
| 460 | 460 | { |
| 461 | 461 | struct nfs_diropargs arg = { |
| 462 | 462 | .fh = NFS_FH(dir), |
| @@ -162,7 +162,7 @@ static int nfs_call_unlink(struct dentry *dentry, struct nfs_unlinkdata *data) · 161 unmodified lines | ||
| 162 | 162 | * @dentry: dentry to unlink |
| 163 | 163 | */ |
| 164 | 164 | static int |
| 165 | −nfs_async_unlink(struct dentry *dentry, struct qstr *name) | |
| 165 | +nfs_async_unlink(struct dentry *dentry, const struct qstr *name) | |
| 166 | 166 | { |
| 167 | 167 | struct nfs_unlinkdata *data; |
| 168 | 168 | int status = -ENOMEM; |
| @@ -172,12 +172,10 @@ void __dlm_unhash_lockres(struct dlm_ctxt *dlm, struct dlm_lock_resource *res) · 171 unmodified lines | ||
| 172 | 172 | void __dlm_insert_lockres(struct dlm_ctxt *dlm, struct dlm_lock_resource *res) |
| 173 | 173 | { |
| 174 | 174 | struct hlist_head *bucket; |
| 175 | − struct qstr *q; | |
| 176 | 175 | |
| 177 | 176 | assert_spin_locked(&dlm->spinlock); |
| 178 | 177 | |
| 179 | − q = &res->lockname; | |
| 180 | − bucket = dlm_lockres_hash(dlm, q->hash); | |
| 178 | + bucket = dlm_lockres_hash(dlm, res->lockname.hash); | |
| 181 | 179 | |
| 182 | 180 | /* get a reference for our hashtable */ |
| 183 | 181 | dlm_lockres_get(res); |
| @@ -469,7 +469,7 @@ static int dlmfs_mkdir(struct inode * dir, · 468 unmodified lines | ||
| 469 | 469 | { |
| 470 | 470 | int status; |
| 471 | 471 | struct inode *inode = NULL; |
| 472 | − struct qstr *domain = &dentry->d_name; | |
| 472 | + const struct qstr *domain = &dentry->d_name; | |
| 473 | 473 | struct dlmfs_inode_private *ip; |
| 474 | 474 | struct ocfs2_cluster_connection *conn; |
| 475 | 475 | |
| @@ -518,7 +518,7 @@ static int dlmfs_create(struct inode *dir, · 42 unmodified lines | ||
| 518 | 518 | { |
| 519 | 519 | int status = 0; |
| 520 | 520 | struct inode *inode; |
| 521 | − struct qstr *name = &dentry->d_name; | |
| 521 | + const struct qstr *name = &dentry->d_name; | |
| 522 | 522 | |
| 523 | 523 | mlog(0, "create %.*s\n", name->len, name->name); |
| 524 | 524 | |
| @@ -667,7 +667,7 @@ void user_dlm_set_locking_protocol(void) · 666 unmodified lines | ||
| 667 | 667 | ocfs2_stack_glue_set_max_proto_version(&user_dlm_lproto.lp_max_version); |
| 668 | 668 | } |
| 669 | 669 | |
| 670 | −struct ocfs2_cluster_connection *user_dlm_register(struct qstr *name) | |
| 670 | +struct ocfs2_cluster_connection *user_dlm_register(const struct qstr *name) | |
| 671 | 671 | { |
| 672 | 672 | int rc; |
| 673 | 673 | struct ocfs2_cluster_connection *conn; |
| @@ -83,7 +83,7 @@ void user_dlm_write_lvb(struct inode *inode, · 82 unmodified lines | ||
| 83 | 83 | ssize_t user_dlm_read_lvb(struct inode *inode, |
| 84 | 84 | char *val, |
| 85 | 85 | unsigned int len); |
| 86 | −struct ocfs2_cluster_connection *user_dlm_register(struct qstr *name); | |
| 86 | +struct ocfs2_cluster_connection *user_dlm_register(const struct qstr *name); | |
| 87 | 87 | void user_dlm_unregister(struct ocfs2_cluster_connection *conn); |
| 88 | 88 | void user_dlm_set_locking_protocol(void); |
| 89 | 89 | |
| @@ -474,7 +474,7 @@ static struct dentry *proc_sys_lookup(struct inode *dir, struct dentry *dentry, · 473 unmodified lines | ||
| 474 | 474 | { |
| 475 | 475 | struct ctl_table_header *head = grab_header(dir); |
| 476 | 476 | struct ctl_table_header *h = NULL; |
| 477 | − struct qstr *name = &dentry->d_name; | |
| 477 | + const struct qstr *name = &dentry->d_name; | |
| 478 | 478 | struct ctl_table *p; |
| 479 | 479 | struct inode *inode; |
| 480 | 480 | struct dentry *err = ERR_PTR(-ENOENT); |
| @@ -263,7 +263,7 @@ extern void d_rehash(struct dentry *); · 262 unmodified lines | ||
| 263 | 263 | |
| 264 | 264 | extern void d_add(struct dentry *, struct inode *); |
| 265 | 265 | |
| 266 | −extern void dentry_update_name_case(struct dentry *, struct qstr *); | |
| 266 | +extern void dentry_update_name_case(struct dentry *, const struct qstr *); | |
| 267 | 267 | |
| 268 | 268 | /* used for rename() and baskets */ |
| 269 | 269 | extern void d_move(struct dentry *, struct dentry *); |
| @@ -1356,7 +1356,7 @@ union security_list_options { · 1355 unmodified lines | ||
| 1356 | 1356 | struct super_block *newsb); |
| 1357 | 1357 | int (*sb_parse_opts_str)(char *options, struct security_mnt_opts *opts); |
| 1358 | 1358 | int (*dentry_init_security)(struct dentry *dentry, int mode, |
| 1359 | − struct qstr *name, void **ctx, | |
| 1359 | + const struct qstr *name, void **ctx, | |
| 1360 | 1360 | u32 *ctxlen); |
| 1361 | 1361 | |
| 1362 | 1362 | |
| @@ -1532,7 +1532,7 @@ struct nfs_rpc_ops { · 1531 unmodified lines | ||
| 1532 | 1532 | struct nfs_fattr *, struct nfs4_label *); |
| 1533 | 1533 | int (*setattr) (struct dentry *, struct nfs_fattr *, |
| 1534 | 1534 | struct iattr *); |
| 1535 | − int (*lookup) (struct inode *, struct qstr *, | |
| 1535 | + int (*lookup) (struct inode *, const struct qstr *, | |
| 1536 | 1536 | struct nfs_fh *, struct nfs_fattr *, |
| 1537 | 1537 | struct nfs4_label *); |
| 1538 | 1538 | int (*access) (struct inode *, struct nfs_access_entry *); |
| @@ -1540,18 +1540,18 @@ struct nfs_rpc_ops { · 1 unmodified line | ||
| 1540 | 1540 | unsigned int); |
| 1541 | 1541 | int (*create) (struct inode *, struct dentry *, |
| 1542 | 1542 | struct iattr *, int); |
| 1543 | − int (*remove) (struct inode *, struct qstr *); | |
| 1543 | + int (*remove) (struct inode *, const struct qstr *); | |
| 1544 | 1544 | void (*unlink_setup) (struct rpc_message *, struct inode *dir); |
| 1545 | 1545 | void (*unlink_rpc_prepare) (struct rpc_task *, struct nfs_unlinkdata *); |
| 1546 | 1546 | int (*unlink_done) (struct rpc_task *, struct inode *); |
| 1547 | 1547 | void (*rename_setup) (struct rpc_message *msg, struct inode *dir); |
| 1548 | 1548 | void (*rename_rpc_prepare)(struct rpc_task *task, struct nfs_renamedata *); |
| 1549 | 1549 | int (*rename_done) (struct rpc_task *task, struct inode *old_dir, struct inode *new_dir); |
| 1550 | − int (*link) (struct inode *, struct inode *, struct qstr *); | |
| 1550 | + int (*link) (struct inode *, struct inode *, const struct qstr *); | |
| 1551 | 1551 | int (*symlink) (struct inode *, struct dentry *, struct page *, |
| 1552 | 1552 | unsigned int, struct iattr *); |
| 1553 | 1553 | int (*mkdir) (struct inode *, struct dentry *, struct iattr *); |
| 1554 | − int (*rmdir) (struct inode *, struct qstr *); | |
| 1554 | + int (*rmdir) (struct inode *, const struct qstr *); | |
| 1555 | 1555 | int (*readdir) (struct dentry *, struct rpc_cred *, |
| 1556 | 1556 | u64, struct page **, unsigned int, int); |
| 1557 | 1557 | int (*mknod) (struct inode *, struct dentry *, struct iattr *, |
| @@ -240,7 +240,7 @@ int security_sb_clone_mnt_opts(const struct super_block *oldsb, · 239 unmodified lines | ||
| 240 | 240 | struct super_block *newsb); |
| 241 | 241 | int security_sb_parse_opts_str(char *options, struct security_mnt_opts *opts); |
| 242 | 242 | int security_dentry_init_security(struct dentry *dentry, int mode, |
| 243 | − struct qstr *name, void **ctx, | |
| 243 | + const struct qstr *name, void **ctx, | |
| 244 | 244 | u32 *ctxlen); |
| 245 | 245 | |
| 246 | 246 | int security_inode_alloc(struct inode *inode); |
| @@ -591,7 +591,7 @@ static inline void security_inode_free(struct inode *inode) · 344 unmodified lines | ||
| 591 | 591 | |
| 592 | 592 | static inline int security_dentry_init_security(struct dentry *dentry, |
| 593 | 593 | int mode, |
| 594 | − struct qstr *name, | |
| 594 | + const struct qstr *name, | |
| 595 | 595 | void **ctx, |
| 596 | 596 | u32 *ctxlen) |
| 597 | 597 | { |
| @@ -356,7 +356,7 @@ void security_inode_free(struct inode *inode) · 355 unmodified lines | ||
| 356 | 356 | } |
| 357 | 357 | |
| 358 | 358 | int security_dentry_init_security(struct dentry *dentry, int mode, |
| 359 | − struct qstr *name, void **ctx, | |
| 359 | + const struct qstr *name, void **ctx, | |
| 360 | 360 | u32 *ctxlen) |
| 361 | 361 | { |
| 362 | 362 | return call_int_hook(dentry_init_security, -EOPNOTSUPP, dentry, mode, |
| @@ -2832,7 +2832,7 @@ static void selinux_inode_free_security(struct inode *inode) · 2831 unmodified lines | ||
| 2832 | 2832 | } |
| 2833 | 2833 | |
| 2834 | 2834 | static int selinux_dentry_init_security(struct dentry *dentry, int mode, |
| 2835 | − struct qstr *name, void **ctx, | |
| 2835 | + const struct qstr *name, void **ctx, | |
| 2836 | 2836 | u32 *ctxlen) |
| 2837 | 2837 | { |
| 2838 | 2838 | u32 newsid; |