Received: with ECARTIS (v1.0.0; list xfs); Mon, 04 Aug 2008 23:26:28 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.0-r574664 (2007-09-11) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-r574664 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with SMTP id m756Q0Fu015064 for ; Mon, 4 Aug 2008 23:26:00 -0700 Received: from [134.14.55.78] (redback.melbourne.sgi.com [134.14.55.78]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id QAA05547; Tue, 5 Aug 2008 16:27:14 +1000 Message-ID: <4897F434.2010309@sgi.com> Date: Tue, 05 Aug 2008 16:33:24 +1000 From: Lachlan McIlroy Reply-To: lachlan@sgi.com User-Agent: Thunderbird 2.0.0.16 (X11/20080707) MIME-Version: 1.0 To: xfs@oss.sgi.com, xfs-dev Subject: [PATCH] Don't release root inode until finished using it Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.91.2/6021/Wed Feb 27 15:55:48 2008 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 17379 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: lachlan@sgi.com Precedence: bulk X-list: xfs During unmount we're releasing the last reference on the root inode before we've finished using it so move it after the XFS_SEND_UNMOUNT hook. --- a/fs/xfs/linux-2.6/xfs_super.c 2008-08-05 13:12:39.000000000 +1000 +++ b/fs/xfs/linux-2.6/xfs_super.c 2008-08-04 14:34:56.000000000 +1000 @@ -1132,8 +1132,6 @@ xfs_fs_put_super( error = xfs_unmount_flush(mp, 0); WARN_ON(error); - IRELE(rip); - /* * If we're forcing a shutdown, typically because of a media error, * we want to make sure we invalidate dirty pages that belong to @@ -1149,6 +1147,8 @@ xfs_fs_put_super( unmount_event_flags); } + IRELE(rip); + xfs_unmountfs(mp); xfs_icsb_destroy_counters(mp); xfs_close_devices(mp);