diff --git a/fs/locks.c b/fs/locks.c index 592faadbcec12f19b2f6ea158e956e2a3b01c838..b9f3a0bed3006810d5e87ddf61db6a55d46d3ce6 100644 --- a/fs/locks.c +++ b/fs/locks.c @@ -1404,6 +1404,7 @@ int generic_setlease(struct file *filp, long arg, struct file_lock **flp) rdlease_count++; } + error = -EAGAIN; if ((arg == F_RDLCK && (wrlease_count > 0)) || (arg == F_WRLCK && ((rdlease_count + wrlease_count) > 0))) goto out;