提交 09516500 编写于 作者: P Patrick Farrell 提交者: Greg Kroah-Hartman

staging/lustre/vvp: release mmap_sem in error case

The mmap_sem is downed in vvp_mmap_locks, but in case of
error from cl_io_lock_alloc_add, it is not upped.

Credit to Paul Casella at Cray for finding this.
Signed-off-by: NPatrick Farrell <paf@cray.com>
Reviewed-on: http://review.whamcloud.com/10741
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5221Reviewed-by: NAndreas Dilger <andreas.dilger@intel.com>
Signed-off-by: NOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 ad33b38b
......@@ -269,8 +269,10 @@ static int vvp_mmap_locks(const struct lu_env *env,
descr->cld_mode, descr->cld_start,
descr->cld_end);
if (result < 0)
if (result < 0) {
up_read(&mm->mmap_sem);
return result;
}
if (vma->vm_end - addr >= count)
break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册