mirror of
https://github.com/torvalds/linux.git
synced 2024-12-29 06:12:08 +00:00
locks: missing unlock on error in generic_add_lease()
We should unlock here before returning.
Fixes: df4e8d2c1d
('locks: implement delegations')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
7f62656be8
commit
4fdb793ffe
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user