Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4fdb793f authored by Dan Carpenter's avatar Dan Carpenter Committed by Al Viro
Browse files

locks: missing unlock on error in generic_add_lease()



We should unlock here before returning.

Fixes: df4e8d2c ('locks: implement delegations')
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 7f62656b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1494,6 +1494,7 @@ static int generic_add_lease(struct file *filp, long arg, struct file_lock **flp

	if (is_deleg && arg == F_WRLCK) {
		/* Write delegations are not currently supported: */
		mutex_unlock(&inode->i_mutex);
		WARN_ON_ONCE(1);
		return -EINVAL;
	}