summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--fs/locks.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/locks.c b/fs/locks.c
index 592faadbcec1..b9f3a0bed300 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;