mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-29 14:05:05 -04:00
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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
f7acd33763
commit
b6ee56fe2a
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user