Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
linux
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martyn Welch
linux
Commits
2e5afe54
Commit
2e5afe54
authored
May 16, 2018
by
Al Viro
Browse files
Options
Downloads
Patches
Plain Diff
ext2: make sure that partially set up inodes won't be returned by ext2_iget()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
5c1a68a3
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
fs/ext2/ialloc.c
+1
-2
1 addition, 2 deletions
fs/ext2/ialloc.c
fs/ext2/namei.c
+3
-6
3 additions, 6 deletions
fs/ext2/namei.c
with
4 additions
and
8 deletions
fs/ext2/ialloc.c
+
1
−
2
View file @
2e5afe54
...
@@ -611,8 +611,7 @@ struct inode *ext2_new_inode(struct inode *dir, umode_t mode,
...
@@ -611,8 +611,7 @@ struct inode *ext2_new_inode(struct inode *dir, umode_t mode,
dquot_drop
(
inode
);
dquot_drop
(
inode
);
inode
->
i_flags
|=
S_NOQUOTA
;
inode
->
i_flags
|=
S_NOQUOTA
;
clear_nlink
(
inode
);
clear_nlink
(
inode
);
unlock_new_inode
(
inode
);
discard_new_inode
(
inode
);
iput
(
inode
);
return
ERR_PTR
(
err
);
return
ERR_PTR
(
err
);
fail:
fail:
...
...
This diff is collapsed.
Click to expand it.
fs/ext2/namei.c
+
3
−
6
View file @
2e5afe54
...
@@ -45,8 +45,7 @@ static inline int ext2_add_nondir(struct dentry *dentry, struct inode *inode)
...
@@ -45,8 +45,7 @@ static inline int ext2_add_nondir(struct dentry *dentry, struct inode *inode)
return
0
;
return
0
;
}
}
inode_dec_link_count
(
inode
);
inode_dec_link_count
(
inode
);
unlock_new_inode
(
inode
);
discard_new_inode
(
inode
);
iput
(
inode
);
return
err
;
return
err
;
}
}
...
@@ -192,8 +191,7 @@ static int ext2_symlink (struct inode * dir, struct dentry * dentry,
...
@@ -192,8 +191,7 @@ static int ext2_symlink (struct inode * dir, struct dentry * dentry,
out_fail:
out_fail:
inode_dec_link_count
(
inode
);
inode_dec_link_count
(
inode
);
unlock_new_inode
(
inode
);
discard_new_inode
(
inode
);
iput
(
inode
);
goto
out
;
goto
out
;
}
}
...
@@ -261,8 +259,7 @@ static int ext2_mkdir(struct inode * dir, struct dentry * dentry, umode_t mode)
...
@@ -261,8 +259,7 @@ static int ext2_mkdir(struct inode * dir, struct dentry * dentry, umode_t mode)
out_fail:
out_fail:
inode_dec_link_count
(
inode
);
inode_dec_link_count
(
inode
);
inode_dec_link_count
(
inode
);
inode_dec_link_count
(
inode
);
unlock_new_inode
(
inode
);
discard_new_inode
(
inode
);
iput
(
inode
);
out_dir:
out_dir:
inode_dec_link_count
(
dir
);
inode_dec_link_count
(
dir
);
goto
out
;
goto
out
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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