From patchwork Fri Apr 22 08:04:30 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benny Halevy X-Patchwork-Id: 726441 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p3M84Sfw032199 for ; Fri, 22 Apr 2011 08:04:48 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752380Ab1DVIEr (ORCPT ); Fri, 22 Apr 2011 04:04:47 -0400 Received: from daytona.panasas.com ([67.152.220.89]:6485 "EHLO daytona.panasas.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751829Ab1DVIEq (ORCPT ); Fri, 22 Apr 2011 04:04:46 -0400 Received: from lt.bhalevy.com.com ([172.17.33.156]) by daytona.panasas.com with Microsoft SMTPSVC(6.0.3790.4675); Fri, 22 Apr 2011 04:04:44 -0400 From: Benny Halevy To: Trond Myklebust Cc: linux-nfs@vger.kernel.org Subject: [PATCH 2/6] SQUASHME: remove assert_spin_locked from pnfs_clear_lseg_list Date: Fri, 22 Apr 2011 11:04:30 +0300 Message-Id: <1303459470-16321-1-git-send-email-bhalevy@panasas.com> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: <4DB125BD.3040703@panasas.com> References: <4DB125BD.3040703@panasas.com> X-OriginalArrivalTime: 22 Apr 2011 08:04:44.0297 (UTC) FILETIME=[F0A68790:01CC00C3] Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 22 Apr 2011 08:04:48 +0000 (UTC) currently it's called only from the evict_inode path no lock is needed there... Signed-off-by: Benny Halevy --- fs/nfs/pnfs.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index 0237b2c..bacde63 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c @@ -410,7 +410,11 @@ mark_matching_lsegs_invalid(struct pnfs_layout_hdr *lo, return invalid - removed; } -/* Returns false if there was nothing to do, true otherwise */ +/* + * Returns false if there was nothing to do, true otherwise. + * + * Must be called under the i_lock (unless from the nfs4_evict_inode path) + */ static bool pnfs_clear_lseg_list(struct pnfs_layout_hdr *lo, struct list_head *tmp_list, struct pnfs_layout_range *range) @@ -420,7 +424,6 @@ pnfs_clear_lseg_list(struct pnfs_layout_hdr *lo, struct list_head *tmp_list, dprintk("%s:Begin lo %p offset %llu length %llu iomode %d\n", __func__, lo, range->offset, range->length, range->iomode); - assert_spin_locked(&lo->plh_inode->i_lock); if (list_empty(&lo->plh_segs)) { if (!test_and_set_bit(NFS_LAYOUT_DESTROYED, &lo->plh_flags)) put_layout_hdr_locked(lo);