Skip to content

Commit f7790d6

Browse files
joannekoongMiklos Szeredi
authored andcommitted
fuse: update stats for pages in dropped aux writeback list
In the case where the aux writeback list is dropped (e.g. the pages have been truncated or the connection is broken), the stats for its pages and backing device info need to be updated as well. Fixes: e2653bd ("fuse: fix leaked aux requests") Signed-off-by: Joanne Koong <[email protected]> Reviewed-by: Josef Bacik <[email protected]> Cc: <[email protected]> # v5.1 Signed-off-by: Miklos Szeredi <[email protected]>
1 parent 76a51ac commit f7790d6

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

fs/fuse/file.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1832,10 +1832,16 @@ __acquires(fi->lock)
18321832
fuse_writepage_finish(fm, wpa);
18331833
spin_unlock(&fi->lock);
18341834

1835-
/* After fuse_writepage_finish() aux request list is private */
1835+
/* After rb_erase() aux request list is private */
18361836
for (aux = wpa->next; aux; aux = next) {
1837+
struct backing_dev_info *bdi = inode_to_bdi(aux->inode);
1838+
18371839
next = aux->next;
18381840
aux->next = NULL;
1841+
1842+
dec_wb_stat(&bdi->wb, WB_WRITEBACK);
1843+
dec_node_page_state(aux->ia.ap.pages[0], NR_WRITEBACK_TEMP);
1844+
wb_writeout_inc(&bdi->wb);
18391845
fuse_writepage_free(aux);
18401846
}
18411847

0 commit comments

Comments
 (0)