Skip to content

Commit ac3ba64

Browse files
author
Al Viro
committed
qstr: constify instances in ext2
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent b59091c commit ac3ba64

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

fs/ext2/dir.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -358,8 +358,8 @@ ext2_readdir(struct file *file, struct dir_context *ctx)
358358
* and the entry itself. Page is returned mapped and unlocked.
359359
* Entry is guaranteed to be valid.
360360
*/
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)
363363
{
364364
const char *name = child->name;
365365
int namelen = child->len;
@@ -435,7 +435,7 @@ struct ext2_dir_entry_2 * ext2_dotdot (struct inode *dir, struct page **p)
435435
return de;
436436
}
437437

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)
439439
{
440440
ino_t res = 0;
441441
struct ext2_dir_entry_2 *de;

fs/ext2/ext2.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -754,9 +754,9 @@ extern void ext2_rsv_window_add(struct super_block *sb, struct ext2_reserve_wind
754754

755755
/* dir.c */
756756
extern int ext2_add_link (struct dentry *, struct inode *);
757-
extern ino_t ext2_inode_by_name(struct inode *, struct qstr *);
757+
extern ino_t ext2_inode_by_name(struct inode *, const struct qstr *);
758758
extern int ext2_make_empty(struct inode *, struct inode *);
759-
extern struct ext2_dir_entry_2 * ext2_find_entry (struct inode *,struct qstr *, struct page **);
759+
extern struct ext2_dir_entry_2 * ext2_find_entry (struct inode *,const struct qstr *, struct page **);
760760
extern int ext2_delete_entry (struct ext2_dir_entry_2 *, struct page *);
761761
extern int ext2_empty_dir (struct inode *);
762762
extern struct ext2_dir_entry_2 * ext2_dotdot (struct inode *, struct page **);

0 commit comments

Comments
 (0)