mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
fs: convert a pile of fsync routines to errseq_t based reporting
This patch converts most of the in-kernel filesystems that do writeback out of the pagecache to report errors using the errseq_t-based infrastructure that was recently added. This allows them to report errors once for each open file description. Most filesystems have a fairly straightforward fsync operation. They call filemap_write_and_wait_range to write back all of the data and wait on it, and then (sometimes) sync out the metadata. For those filesystems this is a straightforward conversion from calling filemap_write_and_wait_range in their fsync operation to calling file_write_and_wait_range. Acked-by: Jan Kara <[email protected]> Acked-by: Dave Kleikamp <[email protected]> Signed-off-by: Jeff Layton <[email protected]>
This commit is contained in:
parent
d07a6ac7b6
commit
3b49c9a1e9
22 changed files with 24 additions and 24 deletions
|
|
@ -34,7 +34,7 @@ static int reiserfs_dir_fsync(struct file *filp, loff_t start, loff_t end,
|
|||
struct inode *inode = filp->f_mapping->host;
|
||||
int err;
|
||||
|
||||
err = filemap_write_and_wait_range(inode->i_mapping, start, end);
|
||||
err = file_write_and_wait_range(filp, start, end);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ static int reiserfs_sync_file(struct file *filp, loff_t start, loff_t end,
|
|||
int err;
|
||||
int barrier_done;
|
||||
|
||||
err = filemap_write_and_wait_range(inode->i_mapping, start, end);
|
||||
err = file_write_and_wait_range(filp, start, end);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue