Return-Path: Received: from mail-io0-f196.google.com ([209.85.223.196]:34725 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760035AbcLAWTs (ORCPT ); Thu, 1 Dec 2016 17:19:48 -0500 Received: by mail-io0-f196.google.com with SMTP id r94so3918290ioe.1 for ; Thu, 01 Dec 2016 14:19:48 -0800 (PST) From: Trond Myklebust To: linux-nfs@vger.kernel.org Subject: [PATCH 26/26] pNFS: Skip invalid stateids when doing a bulk destroy Date: Thu, 1 Dec 2016 17:19:22 -0500 Message-Id: <20161201221922.15657-27-trond.myklebust@primarydata.com> In-Reply-To: <20161201221922.15657-26-trond.myklebust@primarydata.com> References: <20161201221922.15657-1-trond.myklebust@primarydata.com> <20161201221922.15657-2-trond.myklebust@primarydata.com> <20161201221922.15657-3-trond.myklebust@primarydata.com> <20161201221922.15657-4-trond.myklebust@primarydata.com> <20161201221922.15657-5-trond.myklebust@primarydata.com> <20161201221922.15657-6-trond.myklebust@primarydata.com> <20161201221922.15657-7-trond.myklebust@primarydata.com> <20161201221922.15657-8-trond.myklebust@primarydata.com> <20161201221922.15657-9-trond.myklebust@primarydata.com> <20161201221922.15657-10-trond.myklebust@primarydata.com> <20161201221922.15657-11-trond.myklebust@primarydata.com> <20161201221922.15657-12-trond.myklebust@primarydata.com> <20161201221922.15657-13-trond.myklebust@primarydata.com> <20161201221922.15657-14-trond.myklebust@primarydata.com> <20161201221922.15657-15-trond.myklebust@primarydata.com> <20161201221922.15657-16-trond.myklebust@primarydata.com> <20161201221922.15657-17-trond.myklebust@primarydata.com> <20161201221922.15657-18-trond.myklebust@primarydata.com> <20161201221922.15657-19-trond.myklebust@primarydata.com> <20161201221922.15657-20-trond.myklebust@primarydata.com> <20161201221922.15657-21-trond.myklebust@primarydata.com> <20161201221922.15657-22-trond.myklebust@primarydata.com> <20161201221922.15657-23-trond.myklebust@primarydata.com> <20161201221922.15657-24-trond.myklebust@primarydata.com> <20161201221922.15657-25-trond.myklebust@primarydata.com> <20161201221922.15657-26-trond.myklebust@primarydata.com> Sender: linux-nfs-owner@vger.kernel.org List-ID: If the layout stateid is already invalid, we have no work to do. Signed-off-by: Trond Myklebust --- fs/nfs/pnfs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index 550010826bdd..0b25a1c820ba 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c @@ -750,6 +750,8 @@ pnfs_layout_bulk_destroy_byserver_locked(struct nfs_client *clp, struct inode *inode; list_for_each_entry_safe(lo, next, &server->layouts, plh_layouts) { + if (test_bit(NFS_LAYOUT_INVALID_STID, &lo->plh_flags)) + continue; inode = igrab(lo->plh_inode); if (inode == NULL) continue; -- 2.9.3