[PATCH 35/38] pnfsd: use layout stateid for is_layout_recalled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



rather than clientid

Signed-off-by: Benny Halevy <bhalevy@xxxxxxxxxx>
---
 fs/nfsd/nfs4pnfsd.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/fs/nfsd/nfs4pnfsd.c b/fs/nfsd/nfs4pnfsd.c
index 0b256f5..0ef351d 100644
--- a/fs/nfsd/nfs4pnfsd.c
+++ b/fs/nfsd/nfs4pnfsd.c
@@ -548,10 +548,10 @@ struct super_block *
  */
 static int
 is_layout_recalled(struct nfs4_client *clp,
-		   struct svc_fh *current_fh,
-		   struct nfsd4_layout_seg *seg)
+		   struct nfsd4_pnfs_layoutget *lgp)
 {
 	struct nfs4_layoutrecall *clr;
+	struct nfsd4_layout_seg *seg = &lgp->lg_seg;
 
 	spin_lock(&layout_lock);
 	list_for_each_entry (clr, &clp->cl_layoutrecalls, clr_perclnt) {
@@ -560,13 +560,13 @@ struct super_block *
 		if (clr->cb.cbl_recall_type == RETURN_ALL)
 			goto found;
 		if (clr->cb.cbl_recall_type == RETURN_FSID) {
-			if (same_fsid(&clr->cb.cbl_fsid, current_fh))
+			if (same_fsid(&clr->cb.cbl_fsid, lgp->lg_fhp))
 				goto found;
 			else
 				continue;
 		}
 		BUG_ON(clr->cb.cbl_recall_type != RETURN_FILE);
-		if (clr->cb.cbl_seg.clientid == seg->clientid &&
+		if (same_stid((stateid_t *)&clr->cb.cbl_sid, &lgp->lg_sid) &&
 		    lo_seg_overlapping(&clr->cb.cbl_seg, seg))
 			goto found;
 	}
@@ -704,7 +704,7 @@ struct super_block *
 	if (nfserr)
 		goto out_unlock;
 
-	if (is_layout_recalled(clp, lgp->lg_fhp, &lgp->lg_seg)) {
+	if (is_layout_recalled(clp, lgp)) {
 		nfserr = nfserr_recallconflict;
 		goto out_unlock;
 	}
-- 
1.7.11.7

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux