From: Trond Myklebust Date: Tue, 6 Dec 2016 17:00:51 +0000 (-0500) Subject: pNFS/flexfiles: Fix ff_layout_add_ds_error_locked() X-Git-Tag: v4.10-rc1~33^2~26 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cb067935175ca477380806dc80bf5f0bb51f6f71;p=platform%2Fkernel%2Flinux-exynos.git 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 --- diff --git a/fs/nfs/flexfilelayout/flexfilelayoutdev.c b/fs/nfs/flexfilelayout/flexfilelayoutdev.c index eb98395..142bfd0 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, } /* Entries match, so merge "err" into "dserr" */ extend_ds_error(dserr, err->offset, err->length); - list_del(&err->list); + list_replace(&err->list, &dserr->list); kfree(err); + return; } list_add_tail(&dserr->list, head);