提交 252153ba 编写于 作者: E Eric Biggers 提交者: Richard Weinberger

ubifs: switch to fscrypt_prepare_setattr()

Signed-off-by: NEric Biggers <ebiggers@google.com>
Signed-off-by: NRichard Weinberger <richard@nod.at>
上级 a0b3ccd9
......@@ -1284,13 +1284,9 @@ int ubifs_setattr(struct dentry *dentry, struct iattr *attr)
if (err)
return err;
if (ubifs_crypt_is_encrypted(inode) && (attr->ia_valid & ATTR_SIZE)) {
err = fscrypt_get_encryption_info(inode);
if (err)
return err;
if (!fscrypt_has_encryption_key(inode))
return -ENOKEY;
}
err = fscrypt_prepare_setattr(dentry, attr);
if (err)
return err;
if ((attr->ia_valid & ATTR_SIZE) && attr->ia_size < inode->i_size)
/* Truncation to a smaller size */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册