summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorByongho Lee <bhlee.kernel@gmail.com>2015-09-01 23:10:57 +0900
committerDavid Sterba <dsterba@suse.com>2015-10-21 18:28:48 +0200
commitd7641a49a54f66e1a323d0de6b42caeee6d33aa5 (patch)
treef82a79a4cc581a4b87c4df951695ece62471a607
parentf2f767e7345dfe56102d6809f647ba38a238f718 (diff)
downloadop-kernel-dev-d7641a49a54f66e1a323d0de6b42caeee6d33aa5.zip
op-kernel-dev-d7641a49a54f66e1a323d0de6b42caeee6d33aa5.tar.gz
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>
-rw-r--r--fs/btrfs/ioctl.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 0adf542..9181e64 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)
{
struct btrfs_ioctl_fs_info_args *fi_args;
struct btrfs_device *device;
- struct btrfs_device *next;
struct btrfs_fs_devices *fs_devices = root->fs_info->fs_devices;
int ret = 0;
@@ -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;
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)
fi_args->max_id = device->devid;
}
OpenPOWER on IntegriCloud