mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 06:30:53 +07:00
leases: fix a return-value mixup
Fixes a return-value mixup from 85c59580b3
"locks: Fix potential OOPS in generic_setlease()", in which -ENOMEM replaced
what had been intended to stay -EAGAIN in the variable "error".
Signed-off-by: David M. Richter <richterd@citi.umich.edu>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
This commit is contained in:
parent
b69d3987f4
commit
5fcc60c3a0
@ -1404,6 +1404,7 @@ int generic_setlease(struct file *filp, long arg, struct file_lock **flp)
|
|||||||
rdlease_count++;
|
rdlease_count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
error = -EAGAIN;
|
||||||
if ((arg == F_RDLCK && (wrlease_count > 0)) ||
|
if ((arg == F_RDLCK && (wrlease_count > 0)) ||
|
||||||
(arg == F_WRLCK && ((rdlease_count + wrlease_count) > 0)))
|
(arg == F_WRLCK && ((rdlease_count + wrlease_count) > 0)))
|
||||||
goto out;
|
goto out;
|
||||||
|
Loading…
Reference in New Issue
Block a user