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
nexedi
linux
Commits
14c83c9f
Commit
14c83c9f
authored
Dec 28, 2011
by
Theodore Ts'o
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ext4: avoid counting the number of free inodes twice in find_group_orlov()
Signed-off-by:
"Theodore Ts'o"
<
tytso@mit.edu
>
parent
88635ca2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
fs/ext4/ialloc.c
fs/ext4/ialloc.c
+3
-3
No files found.
fs/ext4/ialloc.c
View file @
14c83c9f
...
...
@@ -358,7 +358,7 @@ static int find_group_orlov(struct super_block *sb, struct inode *parent,
struct
ext4_sb_info
*
sbi
=
EXT4_SB
(
sb
);
ext4_group_t
real_ngroups
=
ext4_get_groups_count
(
sb
);
int
inodes_per_group
=
EXT4_INODES_PER_GROUP
(
sb
);
unsigned
int
freei
,
avefreei
;
unsigned
int
freei
,
avefreei
,
grp_free
;
ext4_fsblk_t
freeb
,
avefreec
;
unsigned
int
ndirs
;
int
max_dirs
,
min_inodes
;
...
...
@@ -477,8 +477,8 @@ static int find_group_orlov(struct super_block *sb, struct inode *parent,
for
(
i
=
0
;
i
<
ngroups
;
i
++
)
{
grp
=
(
parent_group
+
i
)
%
ngroups
;
desc
=
ext4_get_group_desc
(
sb
,
grp
,
NULL
);
if
(
desc
&&
ext4_free_inodes_count
(
sb
,
desc
)
&&
ext4_free_inodes_count
(
sb
,
desc
)
>=
avefreei
)
{
grp_free
=
ext4_free_inodes_count
(
sb
,
desc
);
if
(
desc
&&
grp_free
&&
grp_free
>=
avefreei
)
{
*
group
=
grp
;
return
0
;
}
...
...
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