summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
fd4a282)
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.
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I21368247cac23038f9b995e9de328f9286909731
Reviewed-on: http://review.whamcloud.com/6028
Reviewed-by: John Hammond <johnlockwoodhammond@gmail.com>
Reviewed-by: Nikitas Angelinas <nikitas_angelinas@xyratex.com>
Tested-by: Hudson
Reviewed-by: Sebastien Buisson <sebastien.buisson@bull.net>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
it = file->private_data; /* XXX: compat macro */
file->private_data = NULL; /* prevent ll_local_open assertion */
it = file->private_data; /* XXX: compat macro */
file->private_data = NULL; /* prevent ll_local_open assertion */
- fd = ll_file_data_get();
- if (fd == NULL)
- GOTO(out_och_free, rc = -ENOMEM);
+ fd = ll_file_data_get();
+ if (fd == NULL)
+ GOTO(out_openerr, rc = -ENOMEM);
- fd->fd_file = file;
- if (S_ISDIR(inode->i_mode)) {
+ fd->fd_file = file;
+ if (S_ISDIR(inode->i_mode)) {
spin_lock(&lli->lli_sa_lock);
if (lli->lli_opendir_key == NULL && lli->lli_sai == NULL &&
lli->lli_opendir_pid == 0) {
spin_lock(&lli->lli_sa_lock);
if (lli->lli_opendir_key == NULL && lli->lli_sai == NULL &&
lli->lli_opendir_pid == 0) {
opendir_set = 1;
}
spin_unlock(&lli->lli_sa_lock);
opendir_set = 1;
}
spin_unlock(&lli->lli_sa_lock);
if (inode->i_sb->s_root == file->f_dentry) {
LUSTRE_FPRIVATE(file) = fd;
if (inode->i_sb->s_root == file->f_dentry) {
LUSTRE_FPRIVATE(file) = fd;