diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-06-16 12:05:38 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-06-29 04:57:25 -0400 |
commit | 0747fdb2bd59d9404ae2345cbddd7d837c5c4648 (patch) | |
tree | 5f44e37709f8d986df086e4417dc2b5da91cca4a /fs/ecryptfs/file.c | |
parent | cb5e05d1a6786dfd393cf4825d626817df01c2c3 (diff) |
ecryptfs: switch ecryptfs_decode_and_decrypt_filename() from dentry to sb
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ecryptfs/file.c')
-rw-r--r-- | fs/ecryptfs/file.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/ecryptfs/file.c b/fs/ecryptfs/file.c index 9aa05e08060b..24f1105fda3a 100644 --- a/fs/ecryptfs/file.c +++ b/fs/ecryptfs/file.c | |||
@@ -70,7 +70,7 @@ static ssize_t ecryptfs_read_update_atime(struct kiocb *iocb, | |||
70 | struct ecryptfs_getdents_callback { | 70 | struct ecryptfs_getdents_callback { |
71 | struct dir_context ctx; | 71 | struct dir_context ctx; |
72 | struct dir_context *caller; | 72 | struct dir_context *caller; |
73 | struct dentry *dentry; | 73 | struct super_block *sb; |
74 | int filldir_called; | 74 | int filldir_called; |
75 | int entries_written; | 75 | int entries_written; |
76 | }; | 76 | }; |
@@ -88,7 +88,7 @@ ecryptfs_filldir(void *dirent, const char *lower_name, int lower_namelen, | |||
88 | 88 | ||
89 | buf->filldir_called++; | 89 | buf->filldir_called++; |
90 | rc = ecryptfs_decode_and_decrypt_filename(&name, &name_size, | 90 | rc = ecryptfs_decode_and_decrypt_filename(&name, &name_size, |
91 | buf->dentry, lower_name, | 91 | buf->sb, lower_name, |
92 | lower_namelen); | 92 | lower_namelen); |
93 | if (rc) { | 93 | if (rc) { |
94 | printk(KERN_ERR "%s: Error attempting to decode and decrypt " | 94 | printk(KERN_ERR "%s: Error attempting to decode and decrypt " |
@@ -114,15 +114,14 @@ static int ecryptfs_readdir(struct file *file, struct dir_context *ctx) | |||
114 | { | 114 | { |
115 | int rc; | 115 | int rc; |
116 | struct file *lower_file; | 116 | struct file *lower_file; |
117 | struct inode *inode; | 117 | struct inode *inode = file_inode(file); |
118 | struct ecryptfs_getdents_callback buf = { | 118 | struct ecryptfs_getdents_callback buf = { |
119 | .ctx.actor = ecryptfs_filldir, | 119 | .ctx.actor = ecryptfs_filldir, |
120 | .caller = ctx, | 120 | .caller = ctx, |
121 | .dentry = file->f_path.dentry | 121 | .sb = inode->i_sb, |
122 | }; | 122 | }; |
123 | lower_file = ecryptfs_file_to_lower(file); | 123 | lower_file = ecryptfs_file_to_lower(file); |
124 | lower_file->f_pos = ctx->pos; | 124 | lower_file->f_pos = ctx->pos; |
125 | inode = file_inode(file); | ||
126 | rc = iterate_dir(lower_file, &buf.ctx); | 125 | rc = iterate_dir(lower_file, &buf.ctx); |
127 | ctx->pos = buf.ctx.pos; | 126 | ctx->pos = buf.ctx.pos; |
128 | if (rc < 0) | 127 | if (rc < 0) |