]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/ext4/dir.c
Merge branch 'akpm-current/current'
[karo-tx-linux.git] / fs / ext4 / dir.c
index 1d1bca74f84437172d96c26e648e6ed45e129725..b7bcc15f90a5014b82ea09e75c55bde91fd6ce8e 100644 (file)
@@ -111,6 +111,12 @@ static int ext4_readdir(struct file *file, struct dir_context *ctx)
        int dir_has_error = 0;
        struct ext4_str fname_crypto_str = {.name = NULL, .len = 0};
 
+       if (ext4_encrypted_inode(inode)) {
+               err = ext4_get_encryption_info(inode);
+               if (err && err != -ENOKEY)
+                       return err;
+       }
+
        if (is_dx_dir(inode)) {
                err = ext4_dx_readdir(file, ctx);
                if (err != ERR_BAD_DX_DIR) {
@@ -276,7 +282,7 @@ errout:
 static inline int is_32bit_api(void)
 {
 #ifdef CONFIG_COMPAT
-       return is_compat_task();
+       return in_compat_syscall();
 #else
        return (BITS_PER_LONG == 32);
 #endif