mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-19 21:56:31 +00:00
Fixes reporting to BLOCKIO devices fsync() errors, noticed by Bart Van Assche
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3922 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -2661,7 +2661,7 @@ static int vdisk_fsync(struct scst_vdisk_thr *thr, loff_t loff,
|
||||
|
||||
if (virt_dev->blockio) {
|
||||
res = vdisk_blockio_flush(thr->bdev, gfp_flags, true);
|
||||
goto out;
|
||||
goto out_check;
|
||||
}
|
||||
|
||||
file = thr->fd;
|
||||
@@ -2676,6 +2676,8 @@ static int vdisk_fsync(struct scst_vdisk_thr *thr, loff_t loff,
|
||||
res = filemap_write_and_wait_range(file->f_mapping, loff, len);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
out_check:
|
||||
if (unlikely(res != 0)) {
|
||||
PRINT_ERROR("sync range failed (%d)", res);
|
||||
if (cmd != NULL) {
|
||||
|
||||
Reference in New Issue
Block a user