* [PATCH RESEND] ext4: remove unused d_name argument from ext4_search_dir() et al.
@ 2017-05-23 1:22 Eric Biggers
2017-05-23 8:12 ` Jan Kara
0 siblings, 1 reply; 3+ messages in thread
From: Eric Biggers @ 2017-05-23 1:22 UTC (permalink / raw)
To: linux-ext4; +Cc: Theodore Ts'o, Eric Biggers
From: Eric Biggers <ebiggers@google.com>
Now that we are passing a struct ext4_filename, we do not need to pass
around the original struct qstr too.
Signed-off-by: Eric Biggers <ebiggers@google.com>
---
fs/ext4/ext4.h | 2 --
fs/ext4/inline.c | 5 ++---
fs/ext4/namei.c | 13 +++++--------
3 files changed, 7 insertions(+), 13 deletions(-)
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 8e8046104f4d..32191548abed 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -2523,7 +2523,6 @@ extern int ext4_search_dir(struct buffer_head *bh,
int buf_size,
struct inode *dir,
struct ext4_filename *fname,
- const struct qstr *d_name,
unsigned int offset,
struct ext4_dir_entry_2 **res_dir);
extern int ext4_generic_delete_entry(handle_t *handle,
@@ -3007,7 +3006,6 @@ extern int htree_inlinedir_to_tree(struct file *dir_file,
int *has_inline_data);
extern struct buffer_head *ext4_find_inline_entry(struct inode *dir,
struct ext4_filename *fname,
- const struct qstr *d_name,
struct ext4_dir_entry_2 **res_dir,
int *has_inline_data);
extern int ext4_delete_inline_entry(handle_t *handle,
diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c
index d5dea4c293ef..8d141c0c8ff9 100644
--- a/fs/ext4/inline.c
+++ b/fs/ext4/inline.c
@@ -1627,7 +1627,6 @@ int ext4_try_create_inline_dir(handle_t *handle, struct inode *parent,
struct buffer_head *ext4_find_inline_entry(struct inode *dir,
struct ext4_filename *fname,
- const struct qstr *d_name,
struct ext4_dir_entry_2 **res_dir,
int *has_inline_data)
{
@@ -1649,7 +1648,7 @@ struct buffer_head *ext4_find_inline_entry(struct inode *dir,
EXT4_INLINE_DOTDOT_SIZE;
inline_size = EXT4_MIN_INLINE_DATA_SIZE - EXT4_INLINE_DOTDOT_SIZE;
ret = ext4_search_dir(iloc.bh, inline_start, inline_size,
- dir, fname, d_name, 0, res_dir);
+ dir, fname, 0, res_dir);
if (ret == 1)
goto out_find;
if (ret < 0)
@@ -1662,7 +1661,7 @@ struct buffer_head *ext4_find_inline_entry(struct inode *dir,
inline_size = ext4_get_inline_size(dir) - EXT4_MIN_INLINE_DATA_SIZE;
ret = ext4_search_dir(iloc.bh, inline_start, inline_size,
- dir, fname, d_name, 0, res_dir);
+ dir, fname, 0, res_dir);
if (ret == 1)
goto out_find;
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index b81f7d46f344..404256caf9cf 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -1155,12 +1155,11 @@ int ext4_htree_fill_tree(struct file *dir_file, __u32 start_hash,
static inline int search_dirblock(struct buffer_head *bh,
struct inode *dir,
struct ext4_filename *fname,
- const struct qstr *d_name,
unsigned int offset,
struct ext4_dir_entry_2 **res_dir)
{
return ext4_search_dir(bh, bh->b_data, dir->i_sb->s_blocksize, dir,
- fname, d_name, offset, res_dir);
+ fname, offset, res_dir);
}
/*
@@ -1262,7 +1261,6 @@ static inline bool ext4_match(const struct ext4_filename *fname,
*/
int ext4_search_dir(struct buffer_head *bh, char *search_buf, int buf_size,
struct inode *dir, struct ext4_filename *fname,
- const struct qstr *d_name,
unsigned int offset, struct ext4_dir_entry_2 **res_dir)
{
struct ext4_dir_entry_2 * de;
@@ -1355,7 +1353,7 @@ static struct buffer_head * ext4_find_entry (struct inode *dir,
if (ext4_has_inline_data(dir)) {
int has_inline_data = 1;
- ret = ext4_find_inline_entry(dir, &fname, d_name, res_dir,
+ ret = ext4_find_inline_entry(dir, &fname, res_dir,
&has_inline_data);
if (has_inline_data) {
if (inlined)
@@ -1447,7 +1445,7 @@ static struct buffer_head * ext4_find_entry (struct inode *dir,
goto next;
}
set_buffer_verified(bh);
- i = search_dirblock(bh, dir, &fname, d_name,
+ i = search_dirblock(bh, dir, &fname,
block << EXT4_BLOCK_SIZE_BITS(sb), res_dir);
if (i == 1) {
EXT4_I(dir)->i_dir_start_lookup = block;
@@ -1488,7 +1486,6 @@ static struct buffer_head * ext4_dx_find_entry(struct inode *dir,
{
struct super_block * sb = dir->i_sb;
struct dx_frame frames[2], *frame;
- const struct qstr *d_name = fname->usr_fname;
struct buffer_head *bh;
ext4_lblk_t block;
int retval;
@@ -1505,7 +1502,7 @@ static struct buffer_head * ext4_dx_find_entry(struct inode *dir,
if (IS_ERR(bh))
goto errout;
- retval = search_dirblock(bh, dir, fname, d_name,
+ retval = search_dirblock(bh, dir, fname,
block << EXT4_BLOCK_SIZE_BITS(sb),
res_dir);
if (retval == 1)
@@ -1530,7 +1527,7 @@ static struct buffer_head * ext4_dx_find_entry(struct inode *dir,
bh = NULL;
errout:
- dxtrace(printk(KERN_DEBUG "%s not found\n", d_name->name));
+ dxtrace(printk(KERN_DEBUG "%s not found\n", fname->usr_fname->name));
success:
dx_release(frames);
return bh;
--
2.13.0.219.gdb65acc882-goog
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH RESEND] ext4: remove unused d_name argument from ext4_search_dir() et al.
2017-05-23 1:22 [PATCH RESEND] ext4: remove unused d_name argument from ext4_search_dir() et al Eric Biggers
@ 2017-05-23 8:12 ` Jan Kara
2017-05-24 22:12 ` Theodore Ts'o
0 siblings, 1 reply; 3+ messages in thread
From: Jan Kara @ 2017-05-23 8:12 UTC (permalink / raw)
To: Eric Biggers; +Cc: linux-ext4, Theodore Ts'o, Eric Biggers
On Mon 22-05-17 18:22:59, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@google.com>
>
> Now that we are passing a struct ext4_filename, we do not need to pass
> around the original struct qstr too.
>
> Signed-off-by: Eric Biggers <ebiggers@google.com>
Looks good. You can add:
Reviewed-by: Jan Kara <jack@suse.cz>
Honza
> ---
> fs/ext4/ext4.h | 2 --
> fs/ext4/inline.c | 5 ++---
> fs/ext4/namei.c | 13 +++++--------
> 3 files changed, 7 insertions(+), 13 deletions(-)
>
> diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
> index 8e8046104f4d..32191548abed 100644
> --- a/fs/ext4/ext4.h
> +++ b/fs/ext4/ext4.h
> @@ -2523,7 +2523,6 @@ extern int ext4_search_dir(struct buffer_head *bh,
> int buf_size,
> struct inode *dir,
> struct ext4_filename *fname,
> - const struct qstr *d_name,
> unsigned int offset,
> struct ext4_dir_entry_2 **res_dir);
> extern int ext4_generic_delete_entry(handle_t *handle,
> @@ -3007,7 +3006,6 @@ extern int htree_inlinedir_to_tree(struct file *dir_file,
> int *has_inline_data);
> extern struct buffer_head *ext4_find_inline_entry(struct inode *dir,
> struct ext4_filename *fname,
> - const struct qstr *d_name,
> struct ext4_dir_entry_2 **res_dir,
> int *has_inline_data);
> extern int ext4_delete_inline_entry(handle_t *handle,
> diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c
> index d5dea4c293ef..8d141c0c8ff9 100644
> --- a/fs/ext4/inline.c
> +++ b/fs/ext4/inline.c
> @@ -1627,7 +1627,6 @@ int ext4_try_create_inline_dir(handle_t *handle, struct inode *parent,
>
> struct buffer_head *ext4_find_inline_entry(struct inode *dir,
> struct ext4_filename *fname,
> - const struct qstr *d_name,
> struct ext4_dir_entry_2 **res_dir,
> int *has_inline_data)
> {
> @@ -1649,7 +1648,7 @@ struct buffer_head *ext4_find_inline_entry(struct inode *dir,
> EXT4_INLINE_DOTDOT_SIZE;
> inline_size = EXT4_MIN_INLINE_DATA_SIZE - EXT4_INLINE_DOTDOT_SIZE;
> ret = ext4_search_dir(iloc.bh, inline_start, inline_size,
> - dir, fname, d_name, 0, res_dir);
> + dir, fname, 0, res_dir);
> if (ret == 1)
> goto out_find;
> if (ret < 0)
> @@ -1662,7 +1661,7 @@ struct buffer_head *ext4_find_inline_entry(struct inode *dir,
> inline_size = ext4_get_inline_size(dir) - EXT4_MIN_INLINE_DATA_SIZE;
>
> ret = ext4_search_dir(iloc.bh, inline_start, inline_size,
> - dir, fname, d_name, 0, res_dir);
> + dir, fname, 0, res_dir);
> if (ret == 1)
> goto out_find;
>
> diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
> index b81f7d46f344..404256caf9cf 100644
> --- a/fs/ext4/namei.c
> +++ b/fs/ext4/namei.c
> @@ -1155,12 +1155,11 @@ int ext4_htree_fill_tree(struct file *dir_file, __u32 start_hash,
> static inline int search_dirblock(struct buffer_head *bh,
> struct inode *dir,
> struct ext4_filename *fname,
> - const struct qstr *d_name,
> unsigned int offset,
> struct ext4_dir_entry_2 **res_dir)
> {
> return ext4_search_dir(bh, bh->b_data, dir->i_sb->s_blocksize, dir,
> - fname, d_name, offset, res_dir);
> + fname, offset, res_dir);
> }
>
> /*
> @@ -1262,7 +1261,6 @@ static inline bool ext4_match(const struct ext4_filename *fname,
> */
> int ext4_search_dir(struct buffer_head *bh, char *search_buf, int buf_size,
> struct inode *dir, struct ext4_filename *fname,
> - const struct qstr *d_name,
> unsigned int offset, struct ext4_dir_entry_2 **res_dir)
> {
> struct ext4_dir_entry_2 * de;
> @@ -1355,7 +1353,7 @@ static struct buffer_head * ext4_find_entry (struct inode *dir,
>
> if (ext4_has_inline_data(dir)) {
> int has_inline_data = 1;
> - ret = ext4_find_inline_entry(dir, &fname, d_name, res_dir,
> + ret = ext4_find_inline_entry(dir, &fname, res_dir,
> &has_inline_data);
> if (has_inline_data) {
> if (inlined)
> @@ -1447,7 +1445,7 @@ static struct buffer_head * ext4_find_entry (struct inode *dir,
> goto next;
> }
> set_buffer_verified(bh);
> - i = search_dirblock(bh, dir, &fname, d_name,
> + i = search_dirblock(bh, dir, &fname,
> block << EXT4_BLOCK_SIZE_BITS(sb), res_dir);
> if (i == 1) {
> EXT4_I(dir)->i_dir_start_lookup = block;
> @@ -1488,7 +1486,6 @@ static struct buffer_head * ext4_dx_find_entry(struct inode *dir,
> {
> struct super_block * sb = dir->i_sb;
> struct dx_frame frames[2], *frame;
> - const struct qstr *d_name = fname->usr_fname;
> struct buffer_head *bh;
> ext4_lblk_t block;
> int retval;
> @@ -1505,7 +1502,7 @@ static struct buffer_head * ext4_dx_find_entry(struct inode *dir,
> if (IS_ERR(bh))
> goto errout;
>
> - retval = search_dirblock(bh, dir, fname, d_name,
> + retval = search_dirblock(bh, dir, fname,
> block << EXT4_BLOCK_SIZE_BITS(sb),
> res_dir);
> if (retval == 1)
> @@ -1530,7 +1527,7 @@ static struct buffer_head * ext4_dx_find_entry(struct inode *dir,
>
> bh = NULL;
> errout:
> - dxtrace(printk(KERN_DEBUG "%s not found\n", d_name->name));
> + dxtrace(printk(KERN_DEBUG "%s not found\n", fname->usr_fname->name));
> success:
> dx_release(frames);
> return bh;
> --
> 2.13.0.219.gdb65acc882-goog
>
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH RESEND] ext4: remove unused d_name argument from ext4_search_dir() et al.
2017-05-23 8:12 ` Jan Kara
@ 2017-05-24 22:12 ` Theodore Ts'o
0 siblings, 0 replies; 3+ messages in thread
From: Theodore Ts'o @ 2017-05-24 22:12 UTC (permalink / raw)
To: Jan Kara; +Cc: Eric Biggers, linux-ext4, Eric Biggers
On Tue, May 23, 2017 at 10:12:32AM +0200, Jan Kara wrote:
> On Mon 22-05-17 18:22:59, Eric Biggers wrote:
> > From: Eric Biggers <ebiggers@google.com>
> >
> > Now that we are passing a struct ext4_filename, we do not need to pass
> > around the original struct qstr too.
> >
> > Signed-off-by: Eric Biggers <ebiggers@google.com>
>
> Looks good. You can add:
>
> Reviewed-by: Jan Kara <jack@suse.cz>
Thanks, applied.
- Ted
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-05-24 22:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-23 1:22 [PATCH RESEND] ext4: remove unused d_name argument from ext4_search_dir() et al Eric Biggers
2017-05-23 8:12 ` Jan Kara
2017-05-24 22:12 ` Theodore Ts'o
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox