From: Fernando Luis =?ISO-8859-1?Q?V=E1zquez?= Cao Subject: [PATCH 5/9] xfs: switch to using super methods for fsfreeze Date: Fri, 14 Sep 2012 15:50:06 +0900 Message-ID: <1347605406.6868.7.camel@nexus.lab.ntt.co.jp> References: <1347605006.6868.2.camel@nexus.lab.ntt.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: Josef Bacik , Eric Sandeen , Dave Chinner , Christoph Hellwig , Jan Kara , linux-fsdevel@vger.kernel.org, fernando@intellilink.co.jp To: Al Viro Return-path: Received: from tama50.ecl.ntt.co.jp ([129.60.39.147]:34512 "EHLO tama50.ecl.ntt.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755187Ab2INGuT (ORCPT ); Fri, 14 Sep 2012 02:50:19 -0400 In-Reply-To: <1347605006.6868.2.camel@nexus.lab.ntt.co.jp> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: xfs uses the bdev interfaces despite the fact that the kernel is operating at the superblock level here. Convert xfs to use the superblock interfaces instead. Cc: Josef Bacik Cc: Eric Sandeen Cc: Christoph Hellwig Reviewed-by: Jan Kara Signed-off-by: Dave Chinner Signed-off-by: Fernando Luis Vazquez Cao --- diff -urNp linux-3.6-rc5-orig/fs/xfs/xfs_fsops.c linux-3.6-rc5/fs/xfs/xfs_fsops.c --- linux-3.6-rc5-orig/fs/xfs/xfs_fsops.c 2012-07-22 05:58:29.000000000 +0900 +++ linux-3.6-rc5/fs/xfs/xfs_fsops.c 2012-09-14 13:20:44.525043726 +0900 @@ -664,16 +664,12 @@ xfs_fs_goingdown( __uint32_t inflags) { switch (inflags) { - case XFS_FSOP_GOING_FLAGS_DEFAULT: { - struct super_block *sb = freeze_bdev(mp->m_super->s_bdev); - - if (sb && !IS_ERR(sb)) { + case XFS_FSOP_GOING_FLAGS_DEFAULT: + if (!freeze_super(mp->m_super)) { xfs_force_shutdown(mp, SHUTDOWN_FORCE_UMOUNT); - thaw_bdev(sb->s_bdev, sb); + thaw_super(mp->m_super); } - break; - } case XFS_FSOP_GOING_FLAGS_LOGFLUSH: xfs_force_shutdown(mp, SHUTDOWN_FORCE_UMOUNT); break;