if (handle) {
res = ext4_xattr_set_handle(handle, inode,
EXT4_XATTR_INDEX_ENCRYPTION,
EXT4_XATTR_NAME_ENCRYPTION_CONTEXT,
ctx, len, 0); if (!res) {
ext4_set_inode_flag(inode, EXT4_INODE_ENCRYPT);
ext4_clear_inode_state(inode,
EXT4_STATE_MAY_INLINE_DATA); /* *Updateinode->i_flags-S_ENCRYPTEDwillbeenabled, *S_DAXmaybedisabled
*/
ext4_set_inode_flags(inode, false);
} return res;
}
res = dquot_initialize(inode); if (res) return res;
retry:
res = ext4_xattr_set_credits(inode, len, false/* is_create */,
&credits); if (res) return res;
handle = ext4_journal_start(inode, EXT4_HT_MISC, credits); if (IS_ERR(handle)) return PTR_ERR(handle);
res = ext4_xattr_set_handle(handle, inode, EXT4_XATTR_INDEX_ENCRYPTION,
EXT4_XATTR_NAME_ENCRYPTION_CONTEXT,
ctx, len, 0); if (!res) {
ext4_set_inode_flag(inode, EXT4_INODE_ENCRYPT); /* *Updateinode->i_flags-S_ENCRYPTEDwillbeenabled, *S_DAXmaybedisabled
*/
ext4_set_inode_flags(inode, false);
res = ext4_mark_inode_dirty(handle, inode); if (res)
EXT4_ERROR_INODE(inode, "Failed to mark inode dirty");
}
res2 = ext4_journal_stop(handle);
if (res == -ENOSPC && ext4_should_retry_alloc(inode->i_sb, &retries)) goto retry; if (!res)
res = res2; return res;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.