[XFS] handle error returns from freeze_bdev
authorChristoph Hellwig <hch@sgi.com>
Fri, 25 Nov 2005 05:41:47 +0000 (16:41 +1100)
committerNathan Scott <nathans@sgi.com>
Fri, 25 Nov 2005 05:41:47 +0000 (16:41 +1100)
SGI-PV: 945483
SGI-Modid: xfs-linux-melb:xfs-kern:201884a

Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
fs/xfs/xfs_fsops.c

index 7ceabd0..d1236d6 100644 (file)
@@ -550,7 +550,7 @@ xfs_fs_goingdown(
                struct vfs *vfsp = XFS_MTOVFS(mp);
                struct super_block *sb = freeze_bdev(vfsp->vfs_super->s_bdev);
 
-               if (sb) {
+               if (sb && !IS_ERR(sb)) {
                        xfs_force_shutdown(mp, XFS_FORCE_UMOUNT);
                        thaw_bdev(sb->s_bdev, sb);
                }