Clear PG_writeback for sync I/O error case
Commit 2b2861362f
accidentally
introduced this issue by only conditionally registering the
commit callback in the async case.
The error handing code for the dmu_tx_assign() failure case
relied on there always being a registered commit callback to
clear the PG_writeback bit. Since that is no longer strictly
true for the synchronous case we must explicitly invoke the
callback.
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #961
This commit is contained in:
parent
8e8e7f35b7
commit
8312c6df55
@ -3848,7 +3848,16 @@ zfs_putpage(struct inode *ip, struct page *pp, struct writeback_control *wbc)
|
||||
if (err == ERESTART)
|
||||
dmu_tx_wait(tx);
|
||||
|
||||
/* Will call all registered commit callbacks */
|
||||
dmu_tx_abort(tx);
|
||||
|
||||
/*
|
||||
* For the synchronous case the commit callback must be
|
||||
* explicitly called because there is no registered callback.
|
||||
*/
|
||||
if (sync)
|
||||
zfs_putpage_commit_cb(pp, ECANCELED);
|
||||
|
||||
return (err);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user