Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 377603
b: refs/heads/master
c: 92e6222
h: refs/heads/master
i:
  377601: 6a06ca6
  377599: 6bf9df4
v: v3
  • Loading branch information
Jan Kara authored and Theodore Ts'o committed Jun 4, 2013
1 parent 7158bb9 commit b465319
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 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: 37b10dd06334ebc89f551d405a0fe27e1a622458
refs/heads/master: 92e6222dfb85db780ebd8caea6a3f9326c375bc0
8 changes: 2 additions & 6 deletions trunk/fs/ext4/fsync.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,20 +99,18 @@ int ext4_sync_file(struct file *file, loff_t start, loff_t end, int datasync)
trace_ext4_sync_file_enter(file, datasync);

if (inode->i_sb->s_flags & MS_RDONLY)
goto out_trace;
goto out;

if (!journal) {
ret = generic_file_fsync(file, start, end, datasync);
if (!ret && !hlist_empty(&inode->i_dentry))
ret = ext4_sync_parent(inode);
goto out_trace;
goto out;
}

ret = filemap_write_and_wait_range(inode->i_mapping, start, end);
if (ret)
return ret;
mutex_lock(&inode->i_mutex);

/*
* data=writeback,ordered:
* The caller's filemap_fdatawrite()/wait will sync the data.
Expand Down Expand Up @@ -143,8 +141,6 @@ int ext4_sync_file(struct file *file, loff_t start, loff_t end, int datasync)
ret = err;
}
out:
mutex_unlock(&inode->i_mutex);
out_trace:
trace_ext4_sync_file_exit(inode, ret);
return ret;
}

0 comments on commit b465319

Please sign in to comment.