Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
22b970264
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Summer2022
22b970264
Commits
6bc445e0
Commit
6bc445e0
authored
9 years ago
by
Theodore Ts'o
Browse files
Options
Downloads
Patches
Plain Diff
ext4 crypto: make sure the encryption info is initialized on opendir(2)
Signed-off-by:
Theodore Ts'o
<
tytso@mit.edu
>
parent
55557029
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
fs/ext4/dir.c
+8
-0
8 additions, 0 deletions
fs/ext4/dir.c
with
8 additions
and
0 deletions
fs/ext4/dir.c
+
8
−
0
View file @
6bc445e0
...
...
@@ -593,6 +593,13 @@ static int ext4_dx_readdir(struct file *file, struct dir_context *ctx)
return
0
;
}
static
int
ext4_dir_open
(
struct
inode
*
inode
,
struct
file
*
filp
)
{
if
(
ext4_encrypted_inode
(
inode
))
return
ext4_get_encryption_info
(
inode
)
?
-
EACCES
:
0
;
return
0
;
}
static
int
ext4_release_dir
(
struct
inode
*
inode
,
struct
file
*
filp
)
{
if
(
filp
->
private_data
)
...
...
@@ -635,5 +642,6 @@ const struct file_operations ext4_dir_operations = {
.
compat_ioctl
=
ext4_compat_ioctl
,
#endif
.
fsync
=
ext4_sync_file
,
.
open
=
ext4_dir_open
,
.
release
=
ext4_release_dir
,
};
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment