Skip to content

Commit

Permalink
drbd: get rid of empty statement in is_valid_state
Browse files Browse the repository at this point in the history
This should silence a warning about an empty statement. Thanks to Fabian
Frederick <fabf@skynet.be> who sent a patch I modified to be smaller and
avoids an additional indent level.

Signed-off-by: Roland Kammerer <roland.kammerer@linbit.com>
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
  • Loading branch information
Roland Kammerer authored and Jens Axboe committed Jun 14, 2016
1 parent 7e5fec3 commit 4e526a0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/block/drbd/drbd_state.c
Original file line number Diff line number Diff line change
Expand Up @@ -814,7 +814,7 @@ is_valid_state(struct drbd_device *device, union drbd_state ns)
}

if (rv <= 0)
/* already found a reason to abort */;
goto out; /* already found a reason to abort */
else if (ns.role == R_SECONDARY && device->open_cnt)
rv = SS_DEVICE_IN_USE;

Expand Down Expand Up @@ -862,6 +862,7 @@ is_valid_state(struct drbd_device *device, union drbd_state ns)
else if (ns.conn >= C_CONNECTED && ns.pdsk == D_UNKNOWN)
rv = SS_CONNECTED_OUTDATES;

out:
rcu_read_unlock();

return rv;
Expand Down

0 comments on commit 4e526a0

Please sign in to comment.