diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2016-12-06 12:00:51 -0500 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2016-12-07 13:41:58 -0500 |
commit | cb067935175ca477380806dc80bf5f0bb51f6f71 (patch) | |
tree | 12a1e4f89c0e18f47d83195d411639cecb9bc1c1 | |
parent | 7a0566b38c518e98df2359c8c15c2b3f91a4d67e (diff) |
pNFS/flexfiles: Fix ff_layout_add_ds_error_locked()
When we're merging an old entry into our new entry, we want to ensure that
we add the list entry in the correct place.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
-rw-r--r-- | fs/nfs/flexfilelayout/flexfilelayoutdev.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfs/flexfilelayout/flexfilelayoutdev.c b/fs/nfs/flexfilelayout/flexfilelayoutdev.c index eb98395c3651..142bfd0b1663 100644 --- a/fs/nfs/flexfilelayout/flexfilelayoutdev.c +++ b/fs/nfs/flexfilelayout/flexfilelayoutdev.c | |||
@@ -254,8 +254,9 @@ ff_layout_add_ds_error_locked(struct nfs4_flexfile_layout *flo, | |||
254 | } | 254 | } |
255 | /* Entries match, so merge "err" into "dserr" */ | 255 | /* Entries match, so merge "err" into "dserr" */ |
256 | extend_ds_error(dserr, err->offset, err->length); | 256 | extend_ds_error(dserr, err->offset, err->length); |
257 | list_del(&err->list); | 257 | list_replace(&err->list, &dserr->list); |
258 | kfree(err); | 258 | kfree(err); |
259 | return; | ||
259 | } | 260 | } |
260 | 261 | ||
261 | list_add_tail(&dserr->list, head); | 262 | list_add_tail(&dserr->list, head); |