staging/lustre/llite: A not locked mutex can be unlocked.

In case of memory pressure a not locked mutex can be unlocked
in function ll_file_open(). This is not allowed and subsequent
behavior is not defined.

Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3157
Lustre-change: http://review.whamcloud.com/6028
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: John Hammond <johnlockwoodhammond@gmail.com>
Reviewed-by: Nikitas Angelinas <nikitas_angelinas@xyratex.com>
Reviewed-by: Sebastien Buisson <sebastien.buisson@bull.net>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Dmitry Eremin 2013-07-23 00:06:28 +08:00 committed by Greg Kroah-Hartman
parent 73863d83b8
commit e06c9dfec0

View File

@ -526,7 +526,7 @@ int ll_file_open(struct inode *inode, struct file *file)
fd = ll_file_data_get();
if (fd == NULL)
GOTO(out_och_free, rc = -ENOMEM);
GOTO(out_openerr, rc = -ENOMEM);
fd->fd_file = file;
if (S_ISDIR(inode->i_mode)) {