From patchwork Fri Apr 22 08:05:44 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benny Halevy X-Patchwork-Id: 726481 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 p3M84Sg2032199 for ; Fri, 22 Apr 2011 08:06:01 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752485Ab1DVIGA (ORCPT ); Fri, 22 Apr 2011 04:06:00 -0400 Received: from daytona.panasas.com ([67.152.220.89]:6500 "EHLO daytona.panasas.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752409Ab1DVIF7 (ORCPT ); Fri, 22 Apr 2011 04:05:59 -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:05:58 -0400 From: Benny Halevy To: Trond Myklebust Cc: linux-nfs@vger.kernel.org Subject: [PATCH 6/6] SQUASHME: no need to send layoutcommit from _pnfs_return_layout Date: Fri, 22 Apr 2011 11:05:44 +0300 Message-Id: <1303459544-16518-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:05:58.0706 (UTC) FILETIME=[1D007120:01CC00C4] 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:06:01 +0000 (UTC) squash into "pnfs: layoutreturn" Signed-off-by: Benny Halevy --- fs/nfs/pnfs.c | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index ec2418b..27b0593 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c @@ -714,11 +714,8 @@ _pnfs_return_layout(struct inode *ino) spin_unlock(&ino->i_lock); pnfs_free_lseg_list(&tmp_list); - /* Return layout even if layoutcommit fails */ - status = pnfs_layoutcommit_inode(ino, true); - if (status) - dprintk("%s: layoutcommit failed, status=%d. Returning layout anyway\n", - __func__, status); + WARN_ON(test_bit(NFS_INO_LAYOUTCOMMIT, &nfsi->flags)); + status = return_layout(ino); out: dprintk("<-- %s status: %d\n", __func__, status);