Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 229133
b: refs/heads/master
c: 3889fd5
h: refs/heads/master
i:
  229131: 4682487
v: v3
  • Loading branch information
Jiaying Zhang authored and Theodore Ts'o committed Jan 10, 2011
1 parent fd94e5b commit 9ef4745
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b40971426a837e9dc9c66e1b6bbcb3874eafe4e0
refs/heads/master: 3889fd57ea3c58209354862523275774fca9db03
1 change: 1 addition & 0 deletions trunk/fs/ext4/ext4.h
Original file line number Diff line number Diff line change
Expand Up @@ -1671,6 +1671,7 @@ extern void ext4_htree_free_dir_info(struct dir_private_info *p);

/* fsync.c */
extern int ext4_sync_file(struct file *, int);
extern int ext4_flush_completed_IO(struct inode *);

/* hash.c */
extern int ext4fs_dirhash(const char *name, int len, struct
Expand Down
6 changes: 6 additions & 0 deletions trunk/fs/ext4/extents.c
Original file line number Diff line number Diff line change
Expand Up @@ -3533,6 +3533,12 @@ void ext4_ext_truncate(struct inode *inode)
handle_t *handle;
int err = 0;

/*
* finish any pending end_io work so we won't run the risk of
* converting any truncated blocks to initialized later
*/
ext4_flush_completed_IO(inode);

/*
* probably first extent we're gonna free will be last in block
*/
Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/ext4/fsync.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ static void dump_completed_IO(struct inode * inode)
* to written.
* The function return the number of pending IOs on success.
*/
static int flush_completed_IO(struct inode *inode)
extern int ext4_flush_completed_IO(struct inode *inode)
{
ext4_io_end_t *io;
struct ext4_inode_info *ei = EXT4_I(inode);
Expand Down Expand Up @@ -169,7 +169,7 @@ int ext4_sync_file(struct file *file, int datasync)
if (inode->i_sb->s_flags & MS_RDONLY)
return 0;

ret = flush_completed_IO(inode);
ret = ext4_flush_completed_IO(inode);
if (ret < 0)
return ret;

Expand Down

0 comments on commit 9ef4745

Please sign in to comment.