提交 6ca06829 编写于 作者: T Tyson Nottingham 提交者: Theodore Ts'o

ext4: remove unused parameters in sysfs code

Signed-off-by: NTyson Nottingham <tgnottingham@gmail.com>
Signed-off-by: NTheodore Ts'o <tytso@mit.edu>
上级 c2e5df76
...@@ -49,8 +49,7 @@ struct ext4_attr { ...@@ -49,8 +49,7 @@ struct ext4_attr {
} u; } u;
}; };
static ssize_t session_write_kbytes_show(struct ext4_attr *a, static ssize_t session_write_kbytes_show(struct ext4_sb_info *sbi, char *buf)
struct ext4_sb_info *sbi, char *buf)
{ {
struct super_block *sb = sbi->s_buddy_cache->i_sb; struct super_block *sb = sbi->s_buddy_cache->i_sb;
...@@ -61,8 +60,7 @@ static ssize_t session_write_kbytes_show(struct ext4_attr *a, ...@@ -61,8 +60,7 @@ static ssize_t session_write_kbytes_show(struct ext4_attr *a,
sbi->s_sectors_written_start) >> 1); sbi->s_sectors_written_start) >> 1);
} }
static ssize_t lifetime_write_kbytes_show(struct ext4_attr *a, static ssize_t lifetime_write_kbytes_show(struct ext4_sb_info *sbi, char *buf)
struct ext4_sb_info *sbi, char *buf)
{ {
struct super_block *sb = sbi->s_buddy_cache->i_sb; struct super_block *sb = sbi->s_buddy_cache->i_sb;
...@@ -74,8 +72,7 @@ static ssize_t lifetime_write_kbytes_show(struct ext4_attr *a, ...@@ -74,8 +72,7 @@ static ssize_t lifetime_write_kbytes_show(struct ext4_attr *a,
EXT4_SB(sb)->s_sectors_written_start) >> 1))); EXT4_SB(sb)->s_sectors_written_start) >> 1)));
} }
static ssize_t inode_readahead_blks_store(struct ext4_attr *a, static ssize_t inode_readahead_blks_store(struct ext4_sb_info *sbi,
struct ext4_sb_info *sbi,
const char *buf, size_t count) const char *buf, size_t count)
{ {
unsigned long t; unsigned long t;
...@@ -92,8 +89,7 @@ static ssize_t inode_readahead_blks_store(struct ext4_attr *a, ...@@ -92,8 +89,7 @@ static ssize_t inode_readahead_blks_store(struct ext4_attr *a,
return count; return count;
} }
static ssize_t reserved_clusters_store(struct ext4_attr *a, static ssize_t reserved_clusters_store(struct ext4_sb_info *sbi,
struct ext4_sb_info *sbi,
const char *buf, size_t count) const char *buf, size_t count)
{ {
unsigned long long val; unsigned long long val;
...@@ -109,8 +105,7 @@ static ssize_t reserved_clusters_store(struct ext4_attr *a, ...@@ -109,8 +105,7 @@ static ssize_t reserved_clusters_store(struct ext4_attr *a,
return count; return count;
} }
static ssize_t trigger_test_error(struct ext4_attr *a, static ssize_t trigger_test_error(struct ext4_sb_info *sbi,
struct ext4_sb_info *sbi,
const char *buf, size_t count) const char *buf, size_t count)
{ {
int len = count; int len = count;
...@@ -268,9 +263,9 @@ static ssize_t ext4_attr_show(struct kobject *kobj, ...@@ -268,9 +263,9 @@ static ssize_t ext4_attr_show(struct kobject *kobj,
(s64) EXT4_C2B(sbi, (s64) EXT4_C2B(sbi,
percpu_counter_sum(&sbi->s_dirtyclusters_counter))); percpu_counter_sum(&sbi->s_dirtyclusters_counter)));
case attr_session_write_kbytes: case attr_session_write_kbytes:
return session_write_kbytes_show(a, sbi, buf); return session_write_kbytes_show(sbi, buf);
case attr_lifetime_write_kbytes: case attr_lifetime_write_kbytes:
return lifetime_write_kbytes_show(a, sbi, buf); return lifetime_write_kbytes_show(sbi, buf);
case attr_reserved_clusters: case attr_reserved_clusters:
return snprintf(buf, PAGE_SIZE, "%llu\n", return snprintf(buf, PAGE_SIZE, "%llu\n",
(unsigned long long) (unsigned long long)
...@@ -306,7 +301,7 @@ static ssize_t ext4_attr_store(struct kobject *kobj, ...@@ -306,7 +301,7 @@ static ssize_t ext4_attr_store(struct kobject *kobj,
switch (a->attr_id) { switch (a->attr_id) {
case attr_reserved_clusters: case attr_reserved_clusters:
return reserved_clusters_store(a, sbi, buf, len); return reserved_clusters_store(sbi, buf, len);
case attr_pointer_ui: case attr_pointer_ui:
if (!ptr) if (!ptr)
return 0; return 0;
...@@ -316,9 +311,9 @@ static ssize_t ext4_attr_store(struct kobject *kobj, ...@@ -316,9 +311,9 @@ static ssize_t ext4_attr_store(struct kobject *kobj,
*((unsigned int *) ptr) = t; *((unsigned int *) ptr) = t;
return len; return len;
case attr_inode_readahead: case attr_inode_readahead:
return inode_readahead_blks_store(a, sbi, buf, len); return inode_readahead_blks_store(sbi, buf, len);
case attr_trigger_test_error: case attr_trigger_test_error:
return trigger_test_error(a, sbi, buf, len); return trigger_test_error(sbi, buf, len);
} }
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册