Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b6ee56fe authored by John L. Hammond's avatar John L. Hammond Committed by Greg Kroah-Hartman
Browse files

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: default avatarJohn 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: default avatarJinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: default avatarFaccini Bruno <bruno.faccini@intel.com>
Signed-off-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f7acd337
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -2116,10 +2116,14 @@ static int ll_hsm_import(struct inode *inode, struct file *file,
			 ATTR_MTIME | ATTR_MTIME_SET |
			 ATTR_MTIME | ATTR_MTIME_SET |
			 ATTR_ATIME | ATTR_ATIME_SET;
			 ATTR_ATIME | ATTR_ATIME_SET;


	mutex_lock(&inode->i_mutex);

	rc = ll_setattr_raw(file->f_dentry, attr, true);
	rc = ll_setattr_raw(file->f_dentry, attr, true);
	if (rc == -ENODATA)
	if (rc == -ENODATA)
		rc = 0;
		rc = 0;


	mutex_unlock(&inode->i_mutex);

out:
out:
	if (hss != NULL)
	if (hss != NULL)
		OBD_FREE_PTR(hss);
		OBD_FREE_PTR(hss);