mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-21 08:23:25 +07:00
drbd: Removed redundant error checks in the request code path
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
This commit is contained in:
parent
5ba82308ea
commit
905cd7d8ac
@ -984,21 +984,6 @@ static int drbd_fail_request_early(struct drbd_conf *mdev, int is_write)
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Paranoia: we might have been primary, but sync target, or
|
||||
* even diskless, then lost the connection.
|
||||
* This should have been handled (panic? suspend?) somewhere
|
||||
* else. But maybe it was not, so check again here.
|
||||
* Caution: as long as we do not have a read/write lock on mdev,
|
||||
* to serialize state changes, this is racy, since we may lose
|
||||
* the connection *after* we test for the cstate.
|
||||
*/
|
||||
if (mdev->state.disk < D_UP_TO_DATE && mdev->state.pdsk < D_UP_TO_DATE) {
|
||||
if (__ratelimit(&drbd_ratelimit_state))
|
||||
dev_err(DEV, "Sorry, I have no access to good data anymore.\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user