Commit 77f71636 authored by Liang Zhen's avatar Liang Zhen Committed by Greg Kroah-Hartman

staging: lustre: libcfs: invert test condition for libcfs_ioctl

Invert the test of error returned by the handle_ioctl pointer.
This reduces the code by one indentation level.
Signed-off-by: default avatarLiang Zhen <liang.zhen@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5435
Reviewed-on: http://review.whamcloud.com/11313Reviewed-by: default avatarBobi Jam <bobijam@gmail.com>
Reviewed-by: default avatarJohann Lombardi <johann.lombardi@intel.com>
Reviewed-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4e31dad1
......@@ -165,12 +165,13 @@ static int libcfs_ioctl(struct cfs_psdev_file *pfile, unsigned long cmd,
down_read(&ioctl_list_sem);
list_for_each_entry(hand, &ioctl_list, item) {
err = hand->handle_ioctl(cmd, hdr);
if (err != -EINVAL) {
if (err == 0)
err = libcfs_ioctl_popdata(arg,
hdr, hdr->ioc_len);
break;
}
if (err == -EINVAL)
continue;
if (!err)
err = libcfs_ioctl_popdata(arg, hdr,
hdr->ioc_len);
break;
}
up_read(&ioctl_list_sem);
break; }
......
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