diff options
author | Lars Ellenberg <lars.ellenberg@linbit.com> | 2011-02-18 14:13:07 +0100 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2011-10-14 16:47:39 +0200 |
commit | 8c387def58351f571cfcad93a3b57dff415b40c0 (patch) | |
tree | fb55b7722b039d5bdddb2543ab639fbc93b17151 | |
parent | c670a398676499913ce72c26a66d204bcbdbc2e9 (diff) | |
download | linux-8c387def58351f571cfcad93a3b57dff415b40c0.tar.bz2 |
drbd: simplify condition in drbd_may_do_local_read()
fold
if (x >= (N+1))
return 0;
if (x < N)
return 0;
into
if (x != N)
return 0;
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
-rw-r--r-- | drivers/block/drbd/drbd_req.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c index 48d313dcae7d..733219884ab7 100644 --- a/drivers/block/drbd/drbd_req.c +++ b/drivers/block/drbd/drbd_req.c @@ -663,9 +663,7 @@ static int drbd_may_do_local_read(struct drbd_conf *mdev, sector_t sector, int s if (mdev->state.disk == D_UP_TO_DATE) return 1; - if (mdev->state.disk >= D_OUTDATED) - return 0; - if (mdev->state.disk < D_INCONSISTENT) + if (mdev->state.disk != D_INCONSISTENT) return 0; esector = sector + (size >> 9) - 1; |