Commit d07a6ac7 authored by Jeff Layton's avatar Jeff Layton

gfs2: convert to errseq_t based writeback error reporting for fsync

Also, fix a place where a writeback error might get dropped in the
gfs2_is_jdata case.
Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
parent 6454568d
...@@ -668,12 +668,14 @@ static int gfs2_fsync(struct file *file, loff_t start, loff_t end, ...@@ -668,12 +668,14 @@ static int gfs2_fsync(struct file *file, loff_t start, loff_t end,
if (ret) if (ret)
return ret; return ret;
if (gfs2_is_jdata(ip)) if (gfs2_is_jdata(ip))
filemap_write_and_wait(mapping); ret = file_write_and_wait(file);
if (ret)
return ret;
gfs2_ail_flush(ip->i_gl, 1); gfs2_ail_flush(ip->i_gl, 1);
} }
if (mapping->nrpages) if (mapping->nrpages)
ret = filemap_fdatawait_range(mapping, start, end); ret = file_fdatawait_range(file, start, end);
return ret ? ret : ret1; return ret ? ret : ret1;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment