diff options
author | Byongho Lee <bhlee.kernel@gmail.com> | 2015-09-01 10:10:57 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2015-10-21 12:28:48 -0400 |
commit | d7641a49a54f66e1a323d0de6b42caeee6d33aa5 (patch) | |
tree | f82a79a4cc581a4b87c4df951695ece62471a607 /fs/btrfs/ioctl.c | |
parent | f2f767e7345dfe56102d6809f647ba38a238f718 (diff) |
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: David Sterba <dsterba@suse.com>
Signed-off-by: Byongho Lee <bhlee.kernel@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/ioctl.c')
-rw-r--r-- | fs/btrfs/ioctl.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 0adf5422fce9..9181e640feab 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c | |||
@@ -2699,7 +2699,6 @@ static long btrfs_ioctl_fs_info(struct btrfs_root *root, void __user *arg) | |||
2699 | { | 2699 | { |
2700 | struct btrfs_ioctl_fs_info_args *fi_args; | 2700 | struct btrfs_ioctl_fs_info_args *fi_args; |
2701 | struct btrfs_device *device; | 2701 | struct btrfs_device *device; |
2702 | struct btrfs_device *next; | ||
2703 | struct btrfs_fs_devices *fs_devices = root->fs_info->fs_devices; | 2702 | struct btrfs_fs_devices *fs_devices = root->fs_info->fs_devices; |
2704 | int ret = 0; | 2703 | int ret = 0; |
2705 | 2704 | ||
@@ -2711,7 +2710,7 @@ static long btrfs_ioctl_fs_info(struct btrfs_root *root, void __user *arg) | |||
2711 | fi_args->num_devices = fs_devices->num_devices; | 2710 | fi_args->num_devices = fs_devices->num_devices; |
2712 | memcpy(&fi_args->fsid, root->fs_info->fsid, sizeof(fi_args->fsid)); | 2711 | memcpy(&fi_args->fsid, root->fs_info->fsid, sizeof(fi_args->fsid)); |
2713 | 2712 | ||
2714 | list_for_each_entry_safe(device, next, &fs_devices->devices, dev_list) { | 2713 | list_for_each_entry(device, &fs_devices->devices, dev_list) { |
2715 | if (device->devid > fi_args->max_id) | 2714 | if (device->devid > fi_args->max_id) |
2716 | fi_args->max_id = device->devid; | 2715 | fi_args->max_id = device->devid; |
2717 | } | 2716 | } |