btrfs: remove the unnecessary result variables
Return the sysfs_emit() and iterate_object_props() directly instead of using unnecessary variables. Reported-by: Zeal Robot <zealci@zte.com.cn> Reviewed-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: zhang songyi <zhang.songyi@zte.com.cn> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
1c56ab9919
commit
bd64f6221a
|
@ -270,11 +270,8 @@ int btrfs_load_inode_props(struct inode *inode, struct btrfs_path *path)
|
||||||
{
|
{
|
||||||
struct btrfs_root *root = BTRFS_I(inode)->root;
|
struct btrfs_root *root = BTRFS_I(inode)->root;
|
||||||
u64 ino = btrfs_ino(BTRFS_I(inode));
|
u64 ino = btrfs_ino(BTRFS_I(inode));
|
||||||
int ret;
|
|
||||||
|
|
||||||
ret = iterate_object_props(root, path, ino, inode_prop_iterator, inode);
|
return iterate_object_props(root, path, ino, inode_prop_iterator, inode);
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int prop_compression_validate(const struct btrfs_inode *inode,
|
static int prop_compression_validate(const struct btrfs_inode *inode,
|
||||||
|
|
|
@ -839,11 +839,8 @@ static ssize_t btrfs_sinfo_bg_reclaim_threshold_show(struct kobject *kobj,
|
||||||
char *buf)
|
char *buf)
|
||||||
{
|
{
|
||||||
struct btrfs_space_info *space_info = to_space_info(kobj);
|
struct btrfs_space_info *space_info = to_space_info(kobj);
|
||||||
ssize_t ret;
|
|
||||||
|
|
||||||
ret = sysfs_emit(buf, "%d\n", READ_ONCE(space_info->bg_reclaim_threshold));
|
return sysfs_emit(buf, "%d\n", READ_ONCE(space_info->bg_reclaim_threshold));
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static ssize_t btrfs_sinfo_bg_reclaim_threshold_store(struct kobject *kobj,
|
static ssize_t btrfs_sinfo_bg_reclaim_threshold_store(struct kobject *kobj,
|
||||||
|
@ -1205,11 +1202,8 @@ static ssize_t btrfs_bg_reclaim_threshold_show(struct kobject *kobj,
|
||||||
char *buf)
|
char *buf)
|
||||||
{
|
{
|
||||||
struct btrfs_fs_info *fs_info = to_fs_info(kobj);
|
struct btrfs_fs_info *fs_info = to_fs_info(kobj);
|
||||||
ssize_t ret;
|
|
||||||
|
|
||||||
ret = sysfs_emit(buf, "%d\n", READ_ONCE(fs_info->bg_reclaim_threshold));
|
return sysfs_emit(buf, "%d\n", READ_ONCE(fs_info->bg_reclaim_threshold));
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static ssize_t btrfs_bg_reclaim_threshold_store(struct kobject *kobj,
|
static ssize_t btrfs_bg_reclaim_threshold_store(struct kobject *kobj,
|
||||||
|
|
Loading…
Reference in New Issue