History

Merge branch 'work.const-qstr' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs

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

Linus Torvalds committed 10 years ago

Commit 835c92d2 parents ce804bf 19a6d8937 files · +95 −100Browse files

Unified · Split

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

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t