Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
2e5afe54
Commit
2e5afe54
authored
May 16, 2018
by
Al Viro
Browse files
Options
Browse Files
Download
Email 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
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
8 deletions
+4
-8
fs/ext2/ialloc.c
fs/ext2/ialloc.c
+1
-2
fs/ext2/namei.c
fs/ext2/namei.c
+3
-6
No files found.
fs/ext2/ialloc.c
View file @
2e5afe54
...
...
@@ -611,8 +611,7 @@ struct inode *ext2_new_inode(struct inode *dir, umode_t mode,
dquot_drop
(
inode
);
inode
->
i_flags
|=
S_NOQUOTA
;
clear_nlink
(
inode
);
unlock_new_inode
(
inode
);
iput
(
inode
);
discard_new_inode
(
inode
);
return
ERR_PTR
(
err
);
fail:
...
...
fs/ext2/namei.c
View file @
2e5afe54
...
...
@@ -45,8 +45,7 @@ static inline int ext2_add_nondir(struct dentry *dentry, struct inode *inode)
return
0
;
}
inode_dec_link_count
(
inode
);
unlock_new_inode
(
inode
);
iput
(
inode
);
discard_new_inode
(
inode
);
return
err
;
}
...
...
@@ -192,8 +191,7 @@ static int ext2_symlink (struct inode * dir, struct dentry * dentry,
out_fail:
inode_dec_link_count
(
inode
);
unlock_new_inode
(
inode
);
iput
(
inode
);
discard_new_inode
(
inode
);
goto
out
;
}
...
...
@@ -261,8 +259,7 @@ static int ext2_mkdir(struct inode * dir, struct dentry * dentry, umode_t mode)
out_fail:
inode_dec_link_count
(
inode
);
inode_dec_link_count
(
inode
);
unlock_new_inode
(
inode
);
iput
(
inode
);
discard_new_inode
(
inode
);
out_dir:
inode_dec_link_count
(
dir
);
goto
out
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment