diff options
author | John L. Hammond <john.hammond@intel.com> | 2014-08-15 12:48:11 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-08-17 09:38:42 -0700 |
commit | b6ee56fe2afe10cf855de8d11b6097fa82c26163 (patch) | |
tree | 142eafb968360ea805402ffe423052cf57c0a1b2 /drivers | |
parent | f7acd3376387dbf55f76cc77e7dbc870c2719aff (diff) | |
download | linux-b6ee56fe2afe10cf855de8d11b6097fa82c26163.tar.bz2 |
staging/lustre/llite: hold inode mutex around ll_setattr_raw()
ll_setattr_raw() expects to be called with the inode mutex held so do
when calling it from ll_hsm_import().
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Reviewed-on: http://review.whamcloud.com/11349
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5456
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/lustre/lustre/llite/file.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/staging/lustre/lustre/llite/file.c b/drivers/staging/lustre/lustre/llite/file.c index fd1b75a3a569..084fb9206fd5 100644 --- a/drivers/staging/lustre/lustre/llite/file.c +++ b/drivers/staging/lustre/lustre/llite/file.c @@ -2116,10 +2116,14 @@ static int ll_hsm_import(struct inode *inode, struct file *file, ATTR_MTIME | ATTR_MTIME_SET | ATTR_ATIME | ATTR_ATIME_SET; + mutex_lock(&inode->i_mutex); + rc = ll_setattr_raw(file->f_dentry, attr, true); if (rc == -ENODATA) rc = 0; + mutex_unlock(&inode->i_mutex); + out: if (hss != NULL) OBD_FREE_PTR(hss); |