Commit 2ab51f37 authored by Mimi Zohar's avatar Mimi Zohar

vfs: extend vfs_removexattr locking

This patch takes the i_mutex lock before security_inode_removexattr(),
instead of after, in preparation of calling ima_inode_removexattr().
Signed-off-by: default avatarMimi Zohar <zohar@us.ibm.com>
Signed-off-by: default avatarDmitry Kasatkin <dmitry.kasatkin@nokia.com>
parent 2e4930eb
......@@ -295,11 +295,13 @@ vfs_removexattr(struct dentry *dentry, const char *name)
if (error)
return error;
mutex_lock(&inode->i_mutex);
error = security_inode_removexattr(dentry, name);
if (error)
if (error) {
mutex_unlock(&inode->i_mutex);
return error;
}
mutex_lock(&inode->i_mutex);
error = inode->i_op->removexattr(dentry, name);
mutex_unlock(&inode->i_mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment