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
addacc7d
Commit
addacc7d
authored
Jul 22, 2010
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Take dirtying the inode to callers of ext2_free_blocks()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
3889717d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
3 deletions
+7
-3
fs/ext2/balloc.c
fs/ext2/balloc.c
+0
-1
fs/ext2/inode.c
fs/ext2/inode.c
+4
-2
fs/ext2/xattr.c
fs/ext2/xattr.c
+3
-0
No files found.
fs/ext2/balloc.c
View file @
addacc7d
...
@@ -572,7 +572,6 @@ void ext2_free_blocks (struct inode * inode, unsigned long block,
...
@@ -572,7 +572,6 @@ void ext2_free_blocks (struct inode * inode, unsigned long block,
brelse
(
bitmap_bh
);
brelse
(
bitmap_bh
);
release_blocks
(
sb
,
freed
);
release_blocks
(
sb
,
freed
);
dquot_free_block_nodirty
(
inode
,
freed
);
dquot_free_block_nodirty
(
inode
,
freed
);
mark_inode_dirty
(
inode
);
}
}
/**
/**
...
...
fs/ext2/inode.c
View file @
addacc7d
...
@@ -423,6 +423,8 @@ static int ext2_alloc_blocks(struct inode *inode,
...
@@ -423,6 +423,8 @@ static int ext2_alloc_blocks(struct inode *inode,
failed_out:
failed_out:
for
(
i
=
0
;
i
<
index
;
i
++
)
for
(
i
=
0
;
i
<
index
;
i
++
)
ext2_free_blocks
(
inode
,
new_blocks
[
i
],
1
);
ext2_free_blocks
(
inode
,
new_blocks
[
i
],
1
);
if
(
index
)
mark_inode_dirty
(
inode
);
return
ret
;
return
ret
;
}
}
...
@@ -993,8 +995,8 @@ static inline void ext2_free_data(struct inode *inode, __le32 *p, __le32 *q)
...
@@ -993,8 +995,8 @@ static inline void ext2_free_data(struct inode *inode, __le32 *p, __le32 *q)
else
if
(
block_to_free
==
nr
-
count
)
else
if
(
block_to_free
==
nr
-
count
)
count
++
;
count
++
;
else
{
else
{
mark_inode_dirty
(
inode
);
ext2_free_blocks
(
inode
,
block_to_free
,
count
);
ext2_free_blocks
(
inode
,
block_to_free
,
count
);
mark_inode_dirty
(
inode
);
free_this:
free_this:
block_to_free
=
nr
;
block_to_free
=
nr
;
count
=
1
;
count
=
1
;
...
@@ -1002,8 +1004,8 @@ static inline void ext2_free_data(struct inode *inode, __le32 *p, __le32 *q)
...
@@ -1002,8 +1004,8 @@ static inline void ext2_free_data(struct inode *inode, __le32 *p, __le32 *q)
}
}
}
}
if
(
count
>
0
)
{
if
(
count
>
0
)
{
mark_inode_dirty
(
inode
);
ext2_free_blocks
(
inode
,
block_to_free
,
count
);
ext2_free_blocks
(
inode
,
block_to_free
,
count
);
mark_inode_dirty
(
inode
);
}
}
}
}
...
...
fs/ext2/xattr.c
View file @
addacc7d
...
@@ -674,6 +674,7 @@ ext2_xattr_set2(struct inode *inode, struct buffer_head *old_bh,
...
@@ -674,6 +674,7 @@ ext2_xattr_set2(struct inode *inode, struct buffer_head *old_bh,
new_bh
=
sb_getblk
(
sb
,
block
);
new_bh
=
sb_getblk
(
sb
,
block
);
if
(
!
new_bh
)
{
if
(
!
new_bh
)
{
ext2_free_blocks
(
inode
,
block
,
1
);
ext2_free_blocks
(
inode
,
block
,
1
);
mark_inode_dirty
(
inode
);
error
=
-
EIO
;
error
=
-
EIO
;
goto
cleanup
;
goto
cleanup
;
}
}
...
@@ -729,6 +730,7 @@ ext2_xattr_set2(struct inode *inode, struct buffer_head *old_bh,
...
@@ -729,6 +730,7 @@ ext2_xattr_set2(struct inode *inode, struct buffer_head *old_bh,
mb_cache_entry_free
(
ce
);
mb_cache_entry_free
(
ce
);
ea_bdebug
(
old_bh
,
"freeing"
);
ea_bdebug
(
old_bh
,
"freeing"
);
ext2_free_blocks
(
inode
,
old_bh
->
b_blocknr
,
1
);
ext2_free_blocks
(
inode
,
old_bh
->
b_blocknr
,
1
);
mark_inode_dirty
(
inode
);
/* We let our caller release old_bh, so we
/* We let our caller release old_bh, so we
* need to duplicate the buffer before. */
* need to duplicate the buffer before. */
get_bh
(
old_bh
);
get_bh
(
old_bh
);
...
@@ -789,6 +791,7 @@ ext2_xattr_delete_inode(struct inode *inode)
...
@@ -789,6 +791,7 @@ ext2_xattr_delete_inode(struct inode *inode)
if
(
ce
)
if
(
ce
)
mb_cache_entry_free
(
ce
);
mb_cache_entry_free
(
ce
);
ext2_free_blocks
(
inode
,
EXT2_I
(
inode
)
->
i_file_acl
,
1
);
ext2_free_blocks
(
inode
,
EXT2_I
(
inode
)
->
i_file_acl
,
1
);
mark_inode_dirty
(
inode
);
get_bh
(
bh
);
get_bh
(
bh
);
bforget
(
bh
);
bforget
(
bh
);
unlock_buffer
(
bh
);
unlock_buffer
(
bh
);
...
...
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