From 77b7fa051528c2d9248408d9f3a15cca42c0b344 Mon Sep 17 00:00:00 2001 From: rmacklem Date: Sat, 14 Jan 2012 04:04:58 +0000 Subject: [PATCH] Tai Horgan reported via email that there were two places in the new NFSv4 server where the code follows the wrong list. Fortunately, for these fairly rare cases, the lc_stateid[] lists are normally empty. This patch fixes the code to follow the correct list. Reported by: tai.horgan at isilon.com Discussed with: zack MFC after: 2 weeks --- sys/fs/nfsserver/nfs_nfsdstate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/fs/nfsserver/nfs_nfsdstate.c b/sys/fs/nfsserver/nfs_nfsdstate.c index bd246d58376..f14ad43f0e7 100644 --- a/sys/fs/nfsserver/nfs_nfsdstate.c +++ b/sys/fs/nfsserver/nfs_nfsdstate.c @@ -315,7 +315,7 @@ nfsrv_setclient(struct nfsrv_descript *nd, struct nfsclient **new_clpp, for (i = 0; i < NFSSTATEHASHSIZE; i++) { LIST_NEWHEAD(&new_clp->lc_stateid[i], &clp->lc_stateid[i], ls_hash); - LIST_FOREACH(tstp, &new_clp->lc_stateid[i], ls_list) + LIST_FOREACH(tstp, &new_clp->lc_stateid[i], ls_hash) tstp->ls_clp = new_clp; } LIST_INSERT_HEAD(NFSCLIENTHASH(new_clp->lc_clientid), new_clp, @@ -369,7 +369,7 @@ nfsrv_setclient(struct nfsrv_descript *nd, struct nfsclient **new_clpp, for (i = 0; i < NFSSTATEHASHSIZE; i++) { LIST_NEWHEAD(&new_clp->lc_stateid[i], &clp->lc_stateid[i], ls_hash); - LIST_FOREACH(tstp, &new_clp->lc_stateid[i], ls_list) + LIST_FOREACH(tstp, &new_clp->lc_stateid[i], ls_hash) tstp->ls_clp = new_clp; } LIST_INSERT_HEAD(NFSCLIENTHASH(new_clp->lc_clientid), new_clp, -- 2.45.2