From: Dan Carpenter Date: Wed, 13 Nov 2013 07:56:27 +0000 (+0300) Subject: locks: missing unlock on error in generic_add_lease() X-Git-Tag: firefly_0821_release~176^2~4989^2~3 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4fdb793ffe262cfc0b796d3b2cd05ca3b687deb9;p=firefly-linux-kernel-4.4.55.git locks: missing unlock on error in generic_add_lease() We should unlock here before returning. Fixes: df4e8d2c1d2b ('locks: implement delegations') Signed-off-by: Dan Carpenter Signed-off-by: Al Viro --- diff --git a/fs/locks.c b/fs/locks.c index f99d52bdd05a..92a0f0a52b06 100644 --- a/fs/locks.c +++ b/fs/locks.c @@ -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; }