All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ext4: crypto return correct error for file_mmap when get_encryption_info failed.
@ 2015-11-01 22:01 Xu Cang
  2015-11-02  0:32 ` Darrick J. Wong
  0 siblings, 1 reply; 3+ messages in thread
From: Xu Cang @ 2015-11-01 22:01 UTC (permalink / raw)
  To: linux-ext4

diff --git a/fs/ext4/file.c b/fs/ext4/file.c
index 113837e..1c0086a 100644
--- a/fs/ext4/file.c
+++ b/fs/ext4/file.c
@@ -295,7 +295,7 @@ static int ext4_file_mmap(struct file *file,
struct vm_area_struct *vma)
        if (ext4_encrypted_inode(inode)) {
                int err = ext4_get_encryption_info(inode);
                if (err)
-                       return 0;
+                       return -EACCES;
                if (ext4_encryption_info(inode) == NULL)
                        return -ENOKEY;
        }

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-11-02 20:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-01 22:01 [PATCH] ext4: crypto return correct error for file_mmap when get_encryption_info failed Xu Cang
2015-11-02  0:32 ` Darrick J. Wong
2015-11-02 20:26   ` Theodore Ts'o

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.