aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ecryptfs/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ecryptfs/file.c')
-rw-r--r--fs/ecryptfs/file.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/fs/ecryptfs/file.c b/fs/ecryptfs/file.c
index c74ed3ca3372..b76a9853325e 100644
--- a/fs/ecryptfs/file.c
+++ b/fs/ecryptfs/file.c
@@ -82,17 +82,28 @@ ecryptfs_filldir(struct dir_context *ctx, const char *lower_name,
82 buf->sb, lower_name, 82 buf->sb, lower_name,
83 lower_namelen); 83 lower_namelen);
84 if (rc) { 84 if (rc) {
85 printk(KERN_ERR "%s: Error attempting to decode and decrypt " 85 if (rc != -EINVAL) {
86 "filename [%s]; rc = [%d]\n", __func__, lower_name, 86 ecryptfs_printk(KERN_DEBUG,
87 rc); 87 "%s: Error attempting to decode and decrypt filename [%s]; rc = [%d]\n",
88 goto out; 88 __func__, lower_name, rc);
89 return rc;
90 }
91
92 /* Mask -EINVAL errors as these are most likely due a plaintext
93 * filename present in the lower filesystem despite filename
94 * encryption being enabled. One unavoidable example would be
95 * the "lost+found" dentry in the root directory of an Ext4
96 * filesystem.
97 */
98 return 0;
89 } 99 }
100
90 buf->caller->pos = buf->ctx.pos; 101 buf->caller->pos = buf->ctx.pos;
91 rc = !dir_emit(buf->caller, name, name_size, ino, d_type); 102 rc = !dir_emit(buf->caller, name, name_size, ino, d_type);
92 kfree(name); 103 kfree(name);
93 if (!rc) 104 if (!rc)
94 buf->entries_written++; 105 buf->entries_written++;
95out: 106
96 return rc; 107 return rc;
97} 108}
98 109