xfs
[Top] [All Lists]

Re: [PATCH 2/3] Implement generic freeze feature

To: Takashi Sato <t-sato@xxxxxxxxxxxxx>
Subject: Re: [PATCH 2/3] Implement generic freeze feature
From: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Date: Mon, 27 Oct 2008 23:15:33 -0700
Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx>, "linux-fsdevel@xxxxxxxxxxxxxxx" <linux-fsdevel@xxxxxxxxxxxxxxx>, "dm-devel@xxxxxxxxxx" <dm-devel@xxxxxxxxxx>, "viro@xxxxxxxxxxxxxxxxxx" <viro@xxxxxxxxxxxxxxxxxx>, "linux-ext4@xxxxxxxxxxxxxxx" <linux-ext4@xxxxxxxxxxxxxxx>, "xfs@xxxxxxxxxxx" <xfs@xxxxxxxxxxx>, "mtk.manpages@xxxxxxxxxxxxxx" <mtk.manpages@xxxxxxxxxxxxxx>, "axboe@xxxxxxxxx" <axboe@xxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>
In-reply-to: <20081027215855t-sato@xxxxxxxxxxxxxxx>
References: <20081027215855t-sato@xxxxxxxxxxxxxxx>
On Mon, 27 Oct 2008 21:58:54 +0900 Takashi Sato <t-sato@xxxxxxxxxxxxx> wrote:

> -void thaw_bdev(struct block_device *bdev, struct super_block *sb)
> +int thaw_bdev(struct block_device *bdev, struct super_block *sb)
>  {
> +     int error = 0;
> +
> +     mutex_lock(&bdev->bd_fsfreeze_mutex);
> +     if (!bdev->bd_fsfreeze_count) {
> +             mutex_unlock(&bdev->bd_fsfreeze_mutex);
> +             return -EINVAL;

This would be a programming error, yes?

If so, a WARN_ON is more appropriate than a silent runtime error.

> +     }

<Prev in Thread] Current Thread [Next in Thread>