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
3834c3f2
Commit
3834c3f2
authored
Jan 13, 2005
by
Anton Altaparmakov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NTFS: Fix stupid bug in fs/ntfs/mft.c introduced in last changeset.
Signed-off-by:
Anton Altaparmakov
<
aia21@cantab.net
>
parent
149f0c52
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
fs/ntfs/mft.c
fs/ntfs/mft.c
+4
-7
No files found.
fs/ntfs/mft.c
View file @
3834c3f2
...
@@ -2377,22 +2377,20 @@ ntfs_inode *ntfs_mft_record_alloc(ntfs_volume *vol, const int mode,
...
@@ -2377,22 +2377,20 @@ ntfs_inode *ntfs_mft_record_alloc(ntfs_volume *vol, const int mode,
* first written to so it optimizes away nicely in the common case.
* first written to so it optimizes away nicely in the common case.
*/
*/
read_lock_irqsave
(
&
mft_ni
->
size_lock
,
flags
);
read_lock_irqsave
(
&
mft_ni
->
size_lock
,
flags
);
old_data_size
=
mft_ni
->
allocated_size
;
ntfs_debug
(
"Status of mft data before extension: "
ntfs_debug
(
"Status of mft data before extension: "
"allocated_size 0x%llx, data_size 0x%llx, "
"allocated_size 0x%llx, data_size 0x%llx, "
"initialized_size 0x%llx."
,
"initialized_size 0x%llx."
,
(
long
long
)
old_data
_size
,
(
long
long
)
mft_ni
->
allocated
_size
,
(
long
long
)
i_size_read
(
vol
->
mft_ino
),
(
long
long
)
i_size_read
(
vol
->
mft_ino
),
(
long
long
)
mft_ni
->
initialized_size
);
(
long
long
)
mft_ni
->
initialized_size
);
read_unlock_irqrestore
(
&
mft_ni
->
size_lock
,
flags
);
while
(
ll
>
mft_ni
->
allocated_size
)
{
while
(
ll
>
old_data_size
)
{
read_unlock_irqrestore
(
&
mft_ni
->
size_lock
,
flags
);
err
=
ntfs_mft_data_extend_allocation_nolock
(
vol
);
err
=
ntfs_mft_data_extend_allocation_nolock
(
vol
);
if
(
unlikely
(
err
))
{
if
(
unlikely
(
err
))
{
ntfs_error
(
vol
->
sb
,
"Failed to extend mft data "
ntfs_error
(
vol
->
sb
,
"Failed to extend mft data "
"allocation."
);
"allocation."
);
goto
undo_mftbmp_alloc_nolock
;
goto
undo_mftbmp_alloc_nolock
;
}
}
#ifdef DEBUG
read_lock_irqsave
(
&
mft_ni
->
size_lock
,
flags
);
read_lock_irqsave
(
&
mft_ni
->
size_lock
,
flags
);
ntfs_debug
(
"Status of mft data after allocation extension: "
ntfs_debug
(
"Status of mft data after allocation extension: "
"allocated_size 0x%llx, data_size 0x%llx, "
"allocated_size 0x%llx, data_size 0x%llx, "
...
@@ -2400,9 +2398,8 @@ ntfs_inode *ntfs_mft_record_alloc(ntfs_volume *vol, const int mode,
...
@@ -2400,9 +2398,8 @@ ntfs_inode *ntfs_mft_record_alloc(ntfs_volume *vol, const int mode,
(
long
long
)
mft_ni
->
allocated_size
,
(
long
long
)
mft_ni
->
allocated_size
,
(
long
long
)
i_size_read
(
vol
->
mft_ino
),
(
long
long
)
i_size_read
(
vol
->
mft_ino
),
(
long
long
)
mft_ni
->
initialized_size
);
(
long
long
)
mft_ni
->
initialized_size
);
read_unlock_irqrestore
(
&
mft_ni
->
size_lock
,
flags
);
#endif
/* DEBUG */
}
}
read_unlock_irqrestore
(
&
mft_ni
->
size_lock
,
flags
);
/*
/*
* Extend mft data initialized size (and data size of course) to reach
* Extend mft data initialized size (and data size of course) to reach
* the allocated mft record, formatting the mft records allong the way.
* the allocated mft record, formatting the mft records allong the way.
...
...
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