Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 331563
b: refs/heads/master
c: a4a3904
h: refs/heads/master
i:
  331561: fd329ec
  331559: 291269d
v: v3
  • Loading branch information
Theodore Ts'o committed Aug 17, 2012
1 parent d7db717 commit 61f141d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 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: 316e4cfd0b0b4ce846fd0fbda2deebcffbd3e440
refs/heads/master: a4a39040e9dacb5fa28b7ee7f842237ee534e7bf
9 changes: 6 additions & 3 deletions trunk/fs/ext4/fsync.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ int ext4_sync_file(struct file *file, loff_t start, loff_t end, int datasync)
struct inode *inode = file->f_mapping->host;
struct ext4_inode_info *ei = EXT4_I(inode);
journal_t *journal = EXT4_SB(inode->i_sb)->s_journal;
int ret;
int ret, err;
tid_t commit_tid;
bool needs_barrier = false;

Expand Down Expand Up @@ -255,8 +255,11 @@ int ext4_sync_file(struct file *file, loff_t start, loff_t end, int datasync)
needs_barrier = true;
jbd2_log_start_commit(journal, commit_tid);
ret = jbd2_log_wait_commit(journal, commit_tid);
if (needs_barrier)
blkdev_issue_flush(inode->i_sb->s_bdev, GFP_KERNEL, NULL);
if (needs_barrier) {
err = blkdev_issue_flush(inode->i_sb->s_bdev, GFP_KERNEL, NULL);
if (!ret)
ret = err;
}
out:
mutex_unlock(&inode->i_mutex);
trace_ext4_sync_file_exit(inode, ret);
Expand Down

0 comments on commit 61f141d

Please sign in to comment.