ext4: use IS_ENCRYPTED() to check encryption status
This commit removes the ext4 specific ext4_encrypted_inode() and makes use of the generic IS_ENCRYPTED() macro to check for the encryption status of an inode. Reviewed-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Chandan Rajendra <chandan@linux.vnet.ibm.com> Signed-off-by: Eric Biggers <ebiggers@google.com>
This commit is contained in:

committed by
Theodore Ts'o

parent
1058ef0dcb
commit
592ddec757
@@ -771,7 +771,7 @@ struct inode *__ext4_new_inode(handle_t *handle, struct inode *dir,
|
||||
if (unlikely(ext4_forced_shutdown(sbi)))
|
||||
return ERR_PTR(-EIO);
|
||||
|
||||
if ((ext4_encrypted_inode(dir) || DUMMY_ENCRYPTION_ENABLED(sbi)) &&
|
||||
if ((IS_ENCRYPTED(dir) || DUMMY_ENCRYPTION_ENABLED(sbi)) &&
|
||||
(S_ISREG(mode) || S_ISDIR(mode) || S_ISLNK(mode)) &&
|
||||
!(i_flags & EXT4_EA_INODE_FL)) {
|
||||
err = fscrypt_get_encryption_info(dir);
|
||||
|
Reference in New Issue
Block a user