Skip to content

Commit d02d81e

Browse files
author
Trond Myklebust
committed
NFS: Don't loop forever in nfs_do_recoalesce()
If __nfs_pageio_add_request() fails to add the request, it will return with either desc->pg_error < 0, or mirror->pg_recoalesce will be set, so we are guaranteed either to exit the function altogether, or to loop. However if there is nothing left in mirror->pg_list to coalesce, we must exit, so make sure that we clear mirror->pg_recoalesce every time we loop. Reported-by: Olga Kornievskaia <aglo@umich.edu> Fixes: 70536bf ("NFS: Clean up reset of the mirror accounting variables") Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
1 parent ebbe788 commit d02d81e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/nfs/pagelist.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1218,6 +1218,7 @@ static int nfs_do_recoalesce(struct nfs_pageio_descriptor *desc)
12181218

12191219
do {
12201220
list_splice_init(&mirror->pg_list, &head);
1221+
mirror->pg_recoalesce = 0;
12211222

12221223
while (!list_empty(&head)) {
12231224
struct nfs_page *req;

0 commit comments

Comments
 (0)