Commit d7641a49 authored by Byongho Lee's avatar Byongho Lee Committed by David Sterba

btrfs: replace unnecessary list_for_each_entry_safe to list_for_each_entry

There is no removing list element while iterating over list.
So, replace list_for_each_entry_safe to list_for_each_entry.
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarByongho Lee <bhlee.kernel@gmail.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent f2f767e7
...@@ -2699,7 +2699,6 @@ static long btrfs_ioctl_fs_info(struct btrfs_root *root, void __user *arg) ...@@ -2699,7 +2699,6 @@ static long btrfs_ioctl_fs_info(struct btrfs_root *root, void __user *arg)
{ {
struct btrfs_ioctl_fs_info_args *fi_args; struct btrfs_ioctl_fs_info_args *fi_args;
struct btrfs_device *device; struct btrfs_device *device;
struct btrfs_device *next;
struct btrfs_fs_devices *fs_devices = root->fs_info->fs_devices; struct btrfs_fs_devices *fs_devices = root->fs_info->fs_devices;
int ret = 0; int ret = 0;
...@@ -2711,7 +2710,7 @@ static long btrfs_ioctl_fs_info(struct btrfs_root *root, void __user *arg) ...@@ -2711,7 +2710,7 @@ static long btrfs_ioctl_fs_info(struct btrfs_root *root, void __user *arg)
fi_args->num_devices = fs_devices->num_devices; fi_args->num_devices = fs_devices->num_devices;
memcpy(&fi_args->fsid, root->fs_info->fsid, sizeof(fi_args->fsid)); memcpy(&fi_args->fsid, root->fs_info->fsid, sizeof(fi_args->fsid));
list_for_each_entry_safe(device, next, &fs_devices->devices, dev_list) { list_for_each_entry(device, &fs_devices->devices, dev_list) {
if (device->devid > fi_args->max_id) if (device->devid > fi_args->max_id)
fi_args->max_id = device->devid; fi_args->max_id = device->devid;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment