Skip to content

Commit 224ecbf

Browse files
westonandrosadamsontrondmypd
authored andcommitted
pnfs: fix filelayout_retry_commit when idx > 0
filelayout_retry_commit was recently split out from alloc_ds_commits, but was done in such a way that the bucket pointer always starts at index 0 no matter what the @idx argument is set to. The intention of the @idx argument is to retry commits starting at bucket @idx. This is called when alloc_ds_commits fails for a bucket. Signed-off-by: Weston Andros Adamson <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
1 parent 0c0e0d3 commit 224ecbf

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

fs/nfs/filelayout/filelayout.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1269,11 +1269,12 @@ filelayout_search_commit_reqs(struct nfs_commit_info *cinfo, struct page *page)
12691269
static void filelayout_retry_commit(struct nfs_commit_info *cinfo, int idx)
12701270
{
12711271
struct pnfs_ds_commit_info *fl_cinfo = cinfo->ds;
1272-
struct pnfs_commit_bucket *bucket = fl_cinfo->buckets;
1272+
struct pnfs_commit_bucket *bucket;
12731273
struct pnfs_layout_segment *freeme;
12741274
int i;
12751275

1276-
for (i = idx; i < fl_cinfo->nbuckets; i++, bucket++) {
1276+
for (i = idx; i < fl_cinfo->nbuckets; i++) {
1277+
bucket = &fl_cinfo->buckets[i];
12771278
if (list_empty(&bucket->committing))
12781279
continue;
12791280
nfs_retry_commit(&bucket->committing, bucket->clseg, cinfo);

0 commit comments

Comments
 (0)